From 51104ec01415a078b6d8ab2717721b578dd5d1b3 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 20 Sep 2002 20:01:39 +0000 Subject: 2002-09-18 Bruno Haible * login/logout.c (logout): Don't assume ut_time has the same size as a time_t. * login/logwtmp.c (logwtmp): Likewise. --- login/logout.c | 4 ++-- login/logwtmp.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'login') diff --git a/login/logout.c b/login/logout.c index 09a7561801..41c864a0a4 100644 --- a/login/logout.c +++ b/login/logout.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -53,7 +53,7 @@ logout (const char *line) #if _HAVE_UT_TV - 0 gettimeofday (&ut->ut_tv, NULL); #else - time (&ut->ut_time); + ut->ut_time = time (NULL); #endif #if _HAVE_UT_TYPE - 0 ut->ut_type = DEAD_PROCESS; diff --git a/login/logwtmp.c b/login/logwtmp.c index 994029cb63..68a8f8f5b5 100644 --- a/login/logwtmp.c +++ b/login/logwtmp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -46,7 +46,7 @@ logwtmp (const char *line, const char *name, const char *host) #if _HAVE_UT_TV - 0 __gettimeofday (&ut.ut_tv, NULL); #else - time (&ut.ut_time); + ut.ut_time = time (NULL); #endif updwtmp (_PATH_WTMP, &ut); -- cgit v1.2.3