bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] cp: ignore obscure failure to preserve symlink time stamps,


From: Pádraig Brady
Subject: Re: [PATCH] cp: ignore obscure failure to preserve symlink time stamps,
Date: Mon, 24 Aug 2009 09:34:41 +0100
User-agent: Thunderbird 2.0.0.6 (X11/20071008)

Jim Meyering wrote:
> The "preserve symlink time stamps" feature in coreutils-7.5
> is causing trouble in Fedora's build system,
> 
>     http://thread.gmane.org/gmane.linux.redhat.fedora.devel/119834
> 
> because they use a kernel without utimensat support, yet configured/built
> coreutils-7.5 in an environment that suggests (via link tests) that the
> function is available.  Here is the fix I expect to push soon:

> diff --git a/src/copy.c b/src/copy.c
> index bf9230b..8fc4b68 100644
> --- a/src/copy.c
> +++ b/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,
> +     utimensat fails with ENOTSUP.  Ignore that.  */
> +  if (err && errno == ENOSYS)
> +    err = 0;
> +  return err;

I was worried about that but thought it wasn't an issue
as ENOTSUP was not mentioned in the man page :(
http://www.kernel.org/doc/man-pages/online/pages/man2/utimensat.2.html

Michael can we add ENOTSUP to utimensat(2) ?

cheers,
Pádraig.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]