aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/futimes.c
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@redhat.com>2011-12-01 13:27:53 +0100
committerAndreas Schwab <schwab@redhat.com>2011-12-01 14:24:08 +0100
commit6257af2d05d460a0dd3e2a8268dd813edb980d81 (patch)
tree5a13e34b70e93d1a08d856145aeeed9256514530 /sysdeps/unix/sysv/linux/futimes.c
parentb5f44c1ad9acb380cac6df42f2a13461640d91b3 (diff)
downloadglibc-6257af2d05d460a0dd3e2a8268dd813edb980d81.tar
glibc-6257af2d05d460a0dd3e2a8268dd813edb980d81.tar.gz
glibc-6257af2d05d460a0dd3e2a8268dd813edb980d81.tar.bz2
glibc-6257af2d05d460a0dd3e2a8268dd813edb980d81.zip
Truncate time values in Linux futimes when falling back to utime
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 272b83eb05..cd3cce618c 100644
--- a/sysdeps/unix/sysv/linux/futimes.c
+++ b/sysdeps/unix/sysv/linux/futimes.c
@@ -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;