summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;