--- libspt-1.1/sptagent.c.orig 2003-12-12 16:41:57.000000000 +0900 +++ libspt-1.1/sptagent.c 2011-06-28 18:10:29.000000000 +0900 @@ -1032,7 +1032,11 @@ { #ifdef HAVE_UTMP_UT_TV #ifdef HAVE_GETTIMEOFDAY - gettimeofday(&utptr->ut_tv, NULL); + struct timeval tv; + + gettimeofday(&tv, NULL); + utptr->ut_tv.tv_sec = tv.tv_sec; + utptr->ut_tv.tv_usec = tv.tv_usec; #else utptr->ut_tv.tv_sec = time(NULL); utptr->ut_tv.ut_usec = 0;