bug-gnulib
[Top][All Lists]
Advanced

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

Re: utimens on older linux


From: Eric Blake
Subject: Re: utimens on older linux
Date: Mon, 30 Nov 2009 06:47:58 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Eric Blake on 11/25/2009 6:41 AM:
> As discussed on coreutils; some Linux kernels support utimensat but not
> symlink timestamps.  Now pushed.

Needs this fix when targetting cygwin 1.5:

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

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAksTzQ4ACgkQ84KuGfSFAYBphACcCJ2bIU0Urqt+Zv5EeLLWfbYX
y8QAoMDI+OeNpH7Y/s3sY6nn8tl+OZPU
=aH8f
-----END PGP SIGNATURE-----
>From 58f38bb4febbc6a85fea0843ffaaf9422f3783dd Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Mon, 30 Nov 2009 06:45:42 -0700
Subject: [PATCH] utimens: fix compilation error

Fixes a regression from 2009-11-25.

* lib/utimens.c (lutimens) [!HAVE_UTIMENSAT && HAVE_LUTIMES]:
Declare variable at right scope.

Signed-off-by: Eric Blake <address@hidden>
---
 ChangeLog     |    6 ++++++
 lib/utimens.c |    3 ++-
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b0638ae..2c8ee05 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-11-30  Eric Blake  <address@hidden>
+
+       utimens: fix compilation error
+       * lib/utimens.c (lutimens) [!HAVE_UTIMENSAT && HAVE_LUTIMES]:
+       Declare variable at right scope.
+
 2009-11-17  Eric Blake  <address@hidden>

        manywarnings: add more warnings
diff --git a/lib/utimens.c b/lib/utimens.c
index 9e66ffc..5603600 100644
--- a/lib/utimens.c
+++ b/lib/utimens.c
@@ -368,6 +368,7 @@ lutimens (char const *file, struct timespec const 
timespec[2])
   struct timespec *ts = timespec ? adjusted_timespec : NULL;
   int adjustment_needed = 0;
   struct stat st;
+  int result;

   if (ts)
     {
@@ -386,7 +387,7 @@ lutimens (char const *file, struct timespec const 
timespec[2])
 #if HAVE_UTIMENSAT
   if (0 <= lutimensat_works_really)
     {
-      int result = utimensat (AT_FDCWD, file, ts, AT_SYMLINK_NOFOLLOW);
+      result = utimensat (AT_FDCWD, file, ts, AT_SYMLINK_NOFOLLOW);
 # ifdef __linux__
       /* Work around a kernel bug:
          http://bugzilla.redhat.com/442352
-- 
1.6.5.rc1


reply via email to

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