From 570525a6c74ab8a435767aa2e2c75d708670c27f Mon Sep 17 00:00:00 2001 From: peter Date: Sun, 17 Nov 2002 23:46:45 +0000 Subject: Oops. Some ut_time stuff slipped through the cracks. These turned out to be non-fatal due to stack alignment roundups. --- lib/libutil/logout.c | 3 ++- lib/libutil/logwtmp.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/libutil') diff --git a/lib/libutil/logout.c b/lib/libutil/logout.c index b3341f1..f4a2eb6 100644 --- a/lib/libutil/logout.c +++ b/lib/libutil/logout.c @@ -48,6 +48,7 @@ static char sccsid[] = "@(#)logout.c 8.1 (Berkeley) 6/4/93"; #include #include #include +#include #include typedef struct utmp UTMP; @@ -68,7 +69,7 @@ logout(line) continue; bzero(ut.ut_name, UT_NAMESIZE); bzero(ut.ut_host, UT_HOSTSIZE); - (void)time(&ut.ut_time); + ut.ut_time = _time_to_time32(time(NULL)); (void)lseek(fd, -(off_t)sizeof(UTMP), L_INCR); (void)write(fd, &ut, sizeof(UTMP)); rval = 1; diff --git a/lib/libutil/logwtmp.c b/lib/libutil/logwtmp.c index ac407ea..ff9d7dc 100644 --- a/lib/libutil/logwtmp.c +++ b/lib/libutil/logwtmp.c @@ -50,6 +50,7 @@ static char sccsid[] = "@(#)logwtmp.c 8.1 (Berkeley) 6/4/93"; #include #include #include +#include #include #include @@ -102,7 +103,7 @@ logwtmp(line, name, host) (void) strncpy(ut.ut_line, line, sizeof(ut.ut_line)); (void) strncpy(ut.ut_name, name, sizeof(ut.ut_name)); (void) strncpy(ut.ut_host, host, sizeof(ut.ut_host)); - (void) time(&ut.ut_time); + ut.ut_time = _time_to_time32(time(NULL)); if (write(fd, (char *)&ut, sizeof(struct utmp)) != sizeof(struct utmp)) (void) ftruncate(fd, buf.st_size); -- cgit v1.1