From 5581bf28e364425046d7f793f02db8721ae98216 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 8 Sep 2011 11:52:55 +0200 Subject: 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 --- src/stat.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') 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 -- cgit v1.2.3-54-g00ecf