about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/futimes.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/futimes.c')
-rw-r--r--sysdeps/unix/sysv/linux/futimes.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sysdeps/unix/sysv/linux/futimes.c b/sysdeps/unix/sysv/linux/futimes.c
index e7ca99b077..f43f568ec1 100644
--- a/sysdeps/unix/sysv/linux/futimes.c
+++ b/sysdeps/unix/sysv/linux/futimes.c
@@ -1,4 +1,4 @@
-/* futimes -- change access and modification times of open file.  Stub version.
+/* futimes -- change access and modification times of open file.  Linux version.
    Copyright (C) 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -58,8 +58,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;
-      buf.modtime = tvp[1].tv_sec + tvp[1].tv_usec >= 500000;
+      buf.actime = tvp[0].tv_sec + (tvp[0].tv_usec + 500000) / 1000000;
+      buf.modtime = tvp[1].tv_sec + (tvp[1].tv_usec + 500000) / 1000000;
     }
   else
     times = NULL;