summaryrefslogtreecommitdiff
path: root/lib/libutil/logwtmp.c
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2002-11-17 23:46:45 +0000
committerPeter Wemm <peter@FreeBSD.org>2002-11-17 23:46:45 +0000
commitf316609eb45353eb9ee5b7aec3ed280dd08b9a31 (patch)
treefe2ac6129e2e21b162ba9b23cd0299a74ec47421 /lib/libutil/logwtmp.c
parent904f1b77ccbeef0024e9b2456b612488585af53f (diff)
Notes
Diffstat (limited to 'lib/libutil/logwtmp.c')
-rw-r--r--lib/libutil/logwtmp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libutil/logwtmp.c b/lib/libutil/logwtmp.c
index ac407ea4db18..ff9d7dce5f36 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 <stdio.h>
#include <string.h>
#include <time.h>
+#include <timeconv.h>
#include <unistd.h>
#include <utmp.h>
@@ -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);