]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - login/logout.c
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / login / logout.c
index 09a75618013f08b7934775bf8d4e945d42b3c23a..422e5170e15e9ea28a3c426ce1fc8c9fc38da44d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
 
@@ -13,9 +13,8 @@
    Lesser General Public License for more details.
 
    You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
 
 #include <errno.h>
 #include <string.h>
@@ -51,9 +50,12 @@ logout (const char *line)
       bzero (ut->ut_host, sizeof ut->ut_host);
 #endif
 #if _HAVE_UT_TV - 0
-      gettimeofday (&ut->ut_tv, NULL);
+      struct timeval tv;
+      __gettimeofday (&tv, NULL);
+      ut->ut_tv.tv_sec = tv.tv_sec;
+      ut->ut_tv.tv_usec = tv.tv_usec;
 #else
-      time (&ut->ut_time);
+      ut->ut_time = time (NULL);
 #endif
 #if _HAVE_UT_TYPE - 0
       ut->ut_type = DEAD_PROCESS;