2009-08-24 08:38:17 +00:00
|
|
|
diff -urNp coreutils-7.5-orig/src/copy.c coreutils-7.5/src/copy.c
|
|
|
|
--- coreutils-7.5-orig/src/copy.c
|
|
|
|
+++ coreutils-7.5/src/copy.c
|
|
|
|
@@ -124,7 +124,13 @@ static inline int
|
|
|
|
utimens_symlink (char const *file, struct timespec const *timespec)
|
|
|
|
{
|
|
|
|
#if HAVE_UTIMENSAT
|
|
|
|
- return utimensat (AT_FDCWD, file, timespec, AT_SYMLINK_NOFOLLOW);
|
|
|
|
+ int err = utimensat (AT_FDCWD, file, timespec, AT_SYMLINK_NOFOLLOW);
|
|
|
|
+ /* When configuring on a system with new headers and libraries, and
|
|
|
|
+ running on one with a kernel that is old enough to lack the syscall,
|
2009-08-24 09:45:05 +00:00
|
|
|
+ utimensat fails with ENOSYS. Ignore that. */
|
2009-08-24 08:38:17 +00:00
|
|
|
+ if (err && errno == ENOSYS)
|
|
|
|
+ err = 0;
|
|
|
|
+ return err;
|
|
|
|
#else
|
|
|
|
/* Don't set errno=ENOTSUP here as we don't want
|
|
|
|
to output an error message for this case. */
|