diff options
author | Damien Miller <djm@mindrot.org> | 1999-12-21 09:51:36 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 1999-12-21 09:51:36 +1100 |
commit | 368cf64d5c7cee6eb85d9240ea04ccf43273b5fc (patch) | |
tree | 19b5ce1233714df994e9e1699e791d269c577d2c /login.c | |
parent | fdb7caf293e860fda343f9cc98ff3342ed997b73 (diff) |
Made utmpx optional
Diffstat (limited to 'login.c')
-rw-r--r-- | login.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -18,9 +18,9 @@ | |||
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include "includes.h" | 20 | #include "includes.h" |
21 | RCSID("$Id: login.c,v 1.6 1999/12/08 23:16:55 damien Exp $"); | 21 | RCSID("$Id: login.c,v 1.7 1999/12/20 22:51:36 damien Exp $"); |
22 | 22 | ||
23 | #ifdef HAVE_UTMPX_H | 23 | #if defined(HAVE_UTMPX_H) && defined(USE_UTMPX) |
24 | # include <utmpx.h> | 24 | # include <utmpx.h> |
25 | #endif | 25 | #endif |
26 | #ifdef HAVE_UTMP_H | 26 | #ifdef HAVE_UTMP_H |
@@ -94,7 +94,7 @@ record_login(int pid, const char *ttyname, const char *user, uid_t uid, | |||
94 | /* Construct an utmp/wtmp entry. */ | 94 | /* Construct an utmp/wtmp entry. */ |
95 | memset(&u, 0, sizeof(u)); | 95 | memset(&u, 0, sizeof(u)); |
96 | strncpy(u.ut_line, ttyname + 5, sizeof(u.ut_line)); | 96 | strncpy(u.ut_line, ttyname + 5, sizeof(u.ut_line)); |
97 | #ifdef HAVE_UTMPX_H | 97 | #if defined(HAVE_UTMPX_H) && defined(USE_UTMPX) |
98 | u.ut_tv.tv_sec = time(NULL); | 98 | u.ut_tv.tv_sec = time(NULL); |
99 | strncpy(u.ut_user, user, sizeof(u.ut_name)); | 99 | strncpy(u.ut_user, user, sizeof(u.ut_name)); |
100 | #else | 100 | #else |