56 lines
2.2 KiB
Diff
56 lines
2.2 KiB
Diff
http://lists.gnu.org/archive/html/bug-coreutils/2007-05/msg00161.html
|
|
|
|
diff -Nru coreutils-6.9.orig/lib/utimens.c coreutils-6.9/lib/utimens.c
|
|
--- coreutils-6.9.orig/lib/utimens.c 2007-08-16 11:38:32.268087335 +0200
|
|
+++ coreutils-6.9/lib/utimens.c 2007-08-16 11:39:09.626024843 +0200
|
|
@@ -75,8 +75,8 @@
|
|
Return 0 on success, -1 (setting errno) on failure. */
|
|
|
|
int
|
|
-futimens (int fd ATTRIBUTE_UNUSED,
|
|
- char const *file, struct timespec const timespec[2])
|
|
+gl_futimens (int fd ATTRIBUTE_UNUSED,
|
|
+ char const *file, struct timespec const timespec[2])
|
|
{
|
|
/* Some Linux-based NFS clients are buggy, and mishandle time stamps
|
|
of files in NFS file systems in some cases. We have no
|
|
@@ -185,5 +185,5 @@
|
|
int
|
|
utimens (char const *file, struct timespec const timespec[2])
|
|
{
|
|
- return futimens (-1, file, timespec);
|
|
+ return gl_futimens (-1, file, timespec);
|
|
}
|
|
diff -Nru coreutils-6.9.orig/lib/utimens.h coreutils-6.9/lib/utimens.h
|
|
--- coreutils-6.9.orig/lib/utimens.h 2007-08-16 11:38:32.148093960 +0200
|
|
+++ coreutils-6.9/lib/utimens.h 2007-08-16 11:39:09.606025947 +0200
|
|
@@ -1,3 +1,3 @@
|
|
#include <time.h>
|
|
-int futimens (int, char const *, struct timespec const [2]);
|
|
+int gl_futimens (int, char const *, struct timespec const [2]);
|
|
int utimens (char const *, struct timespec const [2]);
|
|
diff -Nru coreutils-6.9.orig/src/copy.c coreutils-6.9/src/copy.c
|
|
--- coreutils-6.9.orig/src/copy.c 2007-08-16 11:38:32.988047587 +0200
|
|
+++ coreutils-6.9/src/copy.c 2007-08-16 11:39:01.596468146 +0200
|
|
@@ -518,7 +518,7 @@
|
|
timespec[0] = get_stat_atime (src_sb);
|
|
timespec[1] = get_stat_mtime (src_sb);
|
|
|
|
- if (futimens (dest_desc, dst_name, timespec) != 0)
|
|
+ if (gl_futimens (dest_desc, dst_name, timespec) != 0)
|
|
{
|
|
error (0, errno, _("preserving times for %s"), quote (dst_name));
|
|
if (x->require_preserve)
|
|
diff -Nru coreutils-6.9.orig/src/touch.c coreutils-6.9/src/touch.c
|
|
--- coreutils-6.9.orig/src/touch.c 2007-08-16 11:38:32.898052555 +0200
|
|
+++ coreutils-6.9/src/touch.c 2007-08-16 11:41:10.989324504 +0200
|
|
@@ -182,7 +182,7 @@
|
|
t = timespec;
|
|
}
|
|
|
|
- ok = (futimens (fd, (fd == STDOUT_FILENO ? NULL : file), t) == 0);
|
|
+ ok = (gl_futimens (fd, (fd == STDOUT_FILENO ? NULL : file), t) == 0);
|
|
|
|
if (fd == STDIN_FILENO)
|
|
{
|