# HG changeset patch # User Eric Blake # Date 1259588742 25200 # Node ID 94e10d90164ddaa97d57e4e1873bbe0be743a9fc # Parent 4b5c20d8205769abccda7f418dc203e762a08e27 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 diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-11-30 Eric Blake + + utimens: fix compilation error + * lib/utimens.c (lutimens) [!HAVE_UTIMENSAT && HAVE_LUTIMES]: + Declare variable at right scope. + 2009-11-29 Jim Meyering bootstrap: handle perl-5.11's changed --version output diff --git a/lib/utimens.c b/lib/utimens.c --- a/lib/utimens.c +++ b/lib/utimens.c @@ -368,6 +368,7 @@ struct timespec *ts = timespec ? adjusted_timespec : NULL; int adjustment_needed = 0; struct stat st; + int result; if (ts) { @@ -386,7 +387,7 @@ #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