aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Mike Frysinger <vapier@gentoo.org>2007-01-28 05:32:51 +0000
committerGravatar Mike Frysinger <vapier@gentoo.org>2007-01-28 05:32:51 +0000
commit53e81590562fb7e180c070522a6f63b38f1344bc (patch)
treed231da751fa6280a18de5dbce63c6a6f524814cc
parent5021dd5e896cc0cd815c2ab237906ae6f32fc6de (diff)
downloaduClibc-53e81590562fb7e180c070522a6f63b38f1344bc.tar.gz
uClibc-53e81590562fb7e180c070522a6f63b38f1344bc.tar.bz2
pull utime fix from trunk
-rw-r--r--libc/sysdeps/linux/common/utime.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/libc/sysdeps/linux/common/utime.c b/libc/sysdeps/linux/common/utime.c
index d7a71d690..e617a7f6e 100644
--- a/libc/sysdeps/linux/common/utime.c
+++ b/libc/sysdeps/linux/common/utime.c
@@ -23,12 +23,7 @@ int utime(const char *file, const struct utimbuf *times)
timevals[1].tv_usec = 0L;
timevals[0].tv_sec = (long int) times->actime;
timevals[1].tv_sec = (long int) times->modtime;
- } else {
- if (gettimeofday(&timevals[0], NULL) < 0) {
- return -1;
- }
- timevals[1] = timevals[0];
}
- return utimes(file, timevals);
+ return utimes(file, times ? timevals : NULL);
}
#endif