NEWS.stable: log cherry-pick [e446f25]->[c092018] relocatable-shell: Update suggested...
[gnulib.git] / lib / lchown.c
index 19eb9c6..647b0a8 100644 (file)
@@ -1,7 +1,7 @@
 /* Provide a stub lchown function for systems that lack it.
 
-   Copyright (C) 1998, 1999, 2002, 2004, 2006, 2007, 2009 Free
-   Software Foundation, Inc.
+   Copyright (C) 1998-1999, 2002, 2004, 2006-2007, 2009-2014 Free Software
+   Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -70,11 +70,12 @@ lchown (const char *file, uid_t uid, gid_t gid)
 int
 rpl_lchown (const char *file, uid_t uid, gid_t gid)
 {
-  struct stat st;
   bool stat_valid = false;
   int result;
 
 # if CHOWN_CHANGE_TIME_BUG
+  struct stat st;
+
   if (gid != (gid_t) -1 || uid != (uid_t) -1)
     {
       if (lstat (file, &st))