--- sysvinit-2.85/src/utmp.c.orig 2004-01-24 10:58:38.000000000 -0800 +++ sysvinit-2.85/src/utmp.c 2004-01-24 11:01:55.000000000 -0800 @@ -47,6 +47,7 @@ int fd; struct utmp utmp; struct utsname uname_buf; + struct timeval ut_tv; /* * Try to open the wtmp file. Note that we even try @@ -76,7 +77,9 @@ */ memset(&utmp, 0, sizeof(utmp)); #if defined(__GLIBC__) - gettimeofday(&utmp.ut_tv, NULL); + gettimeofday(&ut_tv, NULL); + utmp.ut_tv.tv_sec = ut_tv.tv_sec; + utmp.ut_tv.tv_usec = ut_tv.tv_usec; #else time(&utmp.ut_time); #endif @@ -113,6 +116,7 @@ struct utmp utmp; struct utmp tmp; struct utmp *utmptr; + struct timeval ut_tv; /* * Can't do much if UTMP_FILE is not present. @@ -144,7 +148,9 @@ utmp.ut_pid = pid; strncpy(utmp.ut_id, id, sizeof(utmp.ut_id)); #if defined(__GLIBC__) - gettimeofday(&utmp.ut_tv, NULL); + gettimeofday(&ut_tv, NULL); + utmp.ut_tv.tv_sec = ut_tv.tv_sec; + utmp.ut_tv.tv_usec = ut_tv.tv_usec; #else time(&utmp.ut_time); #endif