summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEric Blake <ebb9@byu.net>2009-10-08 06:04:09 -0600
committerEric Blake <ebb9@byu.net>2009-10-08 06:52:15 -0600
commit00674c747512687605447685730021a02bd5901b (patch)
tree53e87efa790b69c5b056e9d9e31220ff33bee2af /src
parenteb5f06f2a68b3abfe507d9fe527f920ada088688 (diff)
downloadcoreutils-00674c747512687605447685730021a02bd5901b.tar.xz
stat: work with recent gnulib changes
* src/stat.c (do_stat): Don't mask function-like stat macro.
Diffstat (limited to 'src')
-rw-r--r--src/stat.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/stat.c b/src/stat.c
index 02d0ead2d..d3e16d705 100644
--- a/src/stat.c
+++ b/src/stat.c
@@ -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;