summaryrefslogtreecommitdiffstats
path: root/login.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>1999-12-21 09:51:36 +1100
committerDamien Miller <djm@mindrot.org>1999-12-21 09:51:36 +1100
commit368cf64d5c7cee6eb85d9240ea04ccf43273b5fc (patch)
tree19b5ce1233714df994e9e1699e791d269c577d2c /login.c
parentfdb7caf293e860fda343f9cc98ff3342ed997b73 (diff)
Made utmpx optionalPRE_HPUX_INTEGRATION
Diffstat (limited to 'login.c')
-rw-r--r--login.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/login.c b/login.c
index ff418457..e506d24e 100644
--- a/login.c
+++ b/login.c
@@ -18,9 +18,9 @@
*/
#include "includes.h"
-RCSID("$Id: login.c,v 1.6 1999/12/08 23:16:55 damien Exp $");
+RCSID("$Id: login.c,v 1.7 1999/12/20 22:51:36 damien Exp $");
-#ifdef HAVE_UTMPX_H
+#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX)
# include <utmpx.h>
#endif
#ifdef HAVE_UTMP_H
@@ -94,7 +94,7 @@ record_login(int pid, const char *ttyname, const char *user, uid_t uid,
/* Construct an utmp/wtmp entry. */
memset(&u, 0, sizeof(u));
strncpy(u.ut_line, ttyname + 5, sizeof(u.ut_line));
-#ifdef HAVE_UTMPX_H
+#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX)
u.ut_tv.tv_sec = time(NULL);
strncpy(u.ut_user, user, sizeof(u.ut_name));
#else