summaryrefslogtreecommitdiff
path: root/loginutils
diff options
context:
space:
mode:
Diffstat (limited to 'loginutils')
-rw-r--r--loginutils/getty.c2
-rw-r--r--loginutils/login.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/loginutils/getty.c b/loginutils/getty.c
index ae183a6..13a8c0c 100644
--- a/loginutils/getty.c
+++ b/loginutils/getty.c
@@ -605,7 +605,7 @@ static void update_utmp(const char *line, char *fakehost)
safe_strncpy(ut.ut_line, line, sizeof(ut.ut_line));
if (fakehost)
safe_strncpy(ut.ut_host, fakehost, sizeof(ut.ut_host));
- ut.ut_time = time(NULL);
+ ut.ut_tv.tv_sec = time(NULL);
ut.ut_type = LOGIN_PROCESS;
ut.ut_pid = mypid;
diff --git a/loginutils/login.c b/loginutils/login.c
index 900a7c0..d9a2f8a 100644
--- a/loginutils/login.c
+++ b/loginutils/login.c
@@ -80,7 +80,7 @@ static void read_or_build_utent(struct utmp *utptr, int picky)
* remotely meaningful by skipping "tty"... */
strncpy(utptr->ut_id, short_tty + 3, sizeof(utptr->ut_id));
strncpy(utptr->ut_user, "LOGIN", sizeof(utptr->ut_user));
- utptr->ut_time = time(NULL);
+ utptr->ut_tv.tv_sec = time(NULL);
}
if (!picky) /* root login */
memset(utptr->ut_host, 0, sizeof(utptr->ut_host));
@@ -96,7 +96,7 @@ static void write_utent(struct utmp *utptr, const char *username)
{
utptr->ut_type = USER_PROCESS;
strncpy(utptr->ut_user, username, sizeof(utptr->ut_user));
- utptr->ut_time = time(NULL);
+ utptr->ut_tv.tv_sec = time(NULL);
/* other fields already filled in by read_or_build_utent above */
setutent();
pututline(utptr);