#! /bin/sh /usr/share/dpatch/dpatch-run ## 82_symlink_utimensat_enosys.dpatch by Michael Stone ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: ignore ENOSYS errors when trying to set symlink times @DPATCH@ diff -urNad coreutils-7.5~/src/copy.c coreutils-7.5/src/copy.c --- coreutils-7.5~/src/copy.c 2009-08-19 15:39:03.000000000 -0400 +++ coreutils-7.5/src/copy.c 2009-09-10 18:43:20.863579169 -0400 @@ -124,12 +124,14 @@ utimens_symlink (char const *file, struct timespec const *timespec) { #if HAVE_UTIMENSAT - return utimensat (AT_FDCWD, file, timespec, AT_SYMLINK_NOFOLLOW); -#else + int ret=0; + ret = utimensat (AT_FDCWD, file, timespec, AT_SYMLINK_NOFOLLOW); + if (ret && errno != ENOSYS) return ret; +#endif + /* Don't set errno=ENOTSUP here as we don't want to output an error message for this case. */ return 0; -#endif } /* Perform the O(1) btrfs clone operation, if possible.