]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
stat: work with recent gnulib changes
authorEric Blake <ebb9@byu.net>
Thu, 8 Oct 2009 12:04:09 +0000 (06:04 -0600)
committerEric Blake <ebb9@byu.net>
Thu, 8 Oct 2009 12:52:15 +0000 (06:52 -0600)
* src/stat.c (do_stat): Don't mask function-like stat macro.

src/stat.c

index 02d0ead2d8870455a0d7725b47ef06e2837ee655..d3e16d70556fe417c3c5e8cba354810a0518fb8e 100644 (file)
@@ -902,7 +902,12 @@ do_stat (char const *filename, bool terse, char const *format)
           return false;
         }
     }
-  else if ((follow_links ? stat : lstat) (filename, &statbuf) != 0)
+  /* We can't use the shorter
+     (follow_links ? stat : lstat) (filename, &statbug)
+     since stat might be a function-like macro.  */
+  else if ((follow_links
+            ? stat (filename, &statbuf)
+            : lstat (filename, &statbuf)) != 0)
     {
       error (0, errno, _("cannot stat %s"), quote (filename));
       return false;