According to Jim Meyering on 1/5/2010 2:07 PM:
>> https://bugzilla.redhat.com/show_bug.cgi?id=552320
> Thanks for the heads up.  Good timing.
> That does indeed look like a bug, and Aurelien Jarno's fix seems right.

I can confirm that the fix is correct.

> 
> I expect to push the following to gnulib in the morning:
> 
>>From e7d83f123f5eed312523252c066510b5de0f7cd1 Mon Sep 17 00:00:00 2001
> From: Aurelien Jarno <[email protected]>
> Date: Tue, 5 Jan 2010 21:31:41 +0100
> Subject: [PATCH] utimens (fdutimens): ignore a negative FD, per contract
> 
> * lib/utimens.c (fdutimens) [HAVE_FUTIMENS]: Call futimens only
> when we have a valid file descriptor.  Otherwise, using a brand
> new glibc (with just-patched futimes that now fails with EBADF)

s/futimes/futimens/ (ChangeLog and commit message)

> +++ b/lib/utimens.c
> @@ -264,19 +264,20 @@ fdutimens (char const *file, int fd, struct timespec 
> const timespec[2])
>          }
>  # endif /* HAVE_UTIMENSAT */
>  # if HAVE_FUTIMENS
> -      {
> -        result = futimens (fd, ts);
> +      if (0 <= fd)
> +     {

Why the TAB?  We just got rid of those in gnulib.

-- 
Don't work too hard, make some time for fun as well!

Eric Blake             [email protected]

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to