diff options
author | Jim Meyering <meyering@redhat.com> | 2011-09-08 11:52:55 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2011-09-08 12:16:17 +0200 |
commit | 5581bf28e364425046d7f793f02db8721ae98216 (patch) | |
tree | 39cfd6f45948152430cc6092b35cef7f752d9c6a /src | |
parent | 5eeaca942ab8fc090cd6b0ae2fede698dc9a6f5d (diff) | |
download | coreutils-5581bf28e364425046d7f793f02db8721ae98216.tar.xz |
stat: avoid compilation failure on AIX 7.x
* src/stat.c (USE_STATVFS): Adjust definition so that it is enabled
also on AIX 7.x systems that provide statvfs64 and no statvfs.
[USE_STATVFS && ! STAT_STATVFS && STAT_STATVFS64] (STATFS): Define
to statvfs64 in that precise case.
* m4/stat-prog.m4 (cu_PREREQ_STAT_PROG): Adjust the condition
here to match the new one in stat.c, to keep them in sync.
Reported by Bruno Haible. For details, see
http://article.gmane.org/gmane.comp.gnu.coreutils.general/1668
Diffstat (limited to 'src')
-rw-r--r-- | src/stat.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/stat.c b/src/stat.c index 535e14184..120365137 100644 --- a/src/stat.c +++ b/src/stat.c @@ -20,7 +20,7 @@ /* Keep this conditional in sync with the similar conditional in ../m4/stat-prog.m4. */ -#if (STAT_STATVFS \ +#if ((STAT_STATVFS || STAT_STATVFS64) \ && (HAVE_STRUCT_STATVFS_F_BASETYPE || HAVE_STRUCT_STATVFS_F_FSTYPENAME \ || (! HAVE_STRUCT_STATFS_F_FSTYPENAME && HAVE_STRUCT_STATVFS_F_TYPE))) # define USE_STATVFS 1 @@ -80,7 +80,11 @@ # if HAVE_STRUCT_STATVFS_F_NAMEMAX # define SB_F_NAMEMAX(S) ((S)->f_namemax) # endif -# define STATFS statvfs +# if ! STAT_STATVFS && STAT_STATVFS64 +# define STATFS statvfs64 +# else +# define STATFS statvfs +# endif # define STATFS_FRSIZE(S) ((S)->f_frsize) #else # define HAVE_STRUCT_STATXFS_F_TYPE HAVE_STRUCT_STATFS_F_TYPE |