]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Truncate time values in Linux futimes when falling back to utime
authorAndreas Schwab <schwab@redhat.com>
Thu, 1 Dec 2011 12:27:53 +0000 (13:27 +0100)
committerAndreas Schwab <schwab@redhat.com>
Thu, 1 Dec 2011 13:24:08 +0000 (14:24 +0100)
ChangeLog
sysdeps/unix/sysv/linux/futimes.c

index 2bf0a0ae1b76c32d60aac242d2470d0c5955eb74..dddb6280ef4e3a1767774d875c5cf2834a7234ed 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-12-01  Andreas Schwab  <schwab@redhat.com>
+
+       * sysdeps/unix/sysv/linux/futimes.c: Truncate time values when
+       falling back to utime.
+
 2011-11-30  Andreas Schwab  <schwab@redhat.com>
 
        * sysdeps/s390/fpu/libm-test-ulps: Relax cpow (2 + 3 i, 4 + 0 i)
index 272b83eb05ce28e163cb74594d6863db9140b002..cd3cce618c7befe0e9827b99d711307b5e4fd635 100644 (file)
@@ -1,5 +1,5 @@
 /* futimes -- change access and modification times of open file.  Linux version.
-   Copyright (C) 2002,2003,2005,2006,2007 Free Software Foundation, Inc.
+   Copyright (C) 2002,2003,2005,2006,2007,2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -95,8 +95,8 @@ __futimes (int fd, const struct timeval tvp[2])
       if (tvp != NULL)
        {
          times = &buf;
-         buf.actime = tvp[0].tv_sec + (tvp[0].tv_usec + 500000) / 1000000;
-         buf.modtime = tvp[1].tv_sec + (tvp[1].tv_usec + 500000) / 1000000;
+         buf.actime = tvp[0].tv_sec;
+         buf.modtime = tvp[1].tv_sec;
        }
       else
        times = NULL;