From: Eric Blake Date: Thu, 8 Oct 2009 12:04:09 +0000 (-0600) Subject: stat: work with recent gnulib changes X-Git-Tag: v8.1~124 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=00674c747512687605447685730021a02bd5901b;p=thirdparty%2Fcoreutils.git stat: work with recent gnulib changes * src/stat.c (do_stat): Don't mask function-like stat macro. --- diff --git a/src/stat.c b/src/stat.c index 02d0ead2d8..d3e16d7055 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;