summaryrefslogtreecommitdiffstats
path: root/term-utils/agetty.c
diff options
context:
space:
mode:
Diffstat (limited to 'term-utils/agetty.c')
-rw-r--r--term-utils/agetty.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/term-utils/agetty.c b/term-utils/agetty.c
index 4cd8675cb..af1e520db 100644
--- a/term-utils/agetty.c
+++ b/term-utils/agetty.c
@@ -849,7 +849,11 @@ static void update_utmp(struct options *op)
if (fakehost)
strncpy(ut.ut_host, fakehost, sizeof(ut.ut_host));
time(&t);
+#if defined(_HAVE_UT_TV)
+ ut.ut_tv.tv_sec = t;
+#else
ut.ut_time = t;
+#endif
ut.ut_type = LOGIN_PROCESS;
ut.ut_pid = pid;
ut.ut_session = sid;