From defe57376249c1385b2874b43307e4c686a1d38c Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 2 Jul 2012 14:24:04 -0700 Subject: [PATCH] fsusage: include files needed for glibc 2.6 fallback MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * lib/fsusage.c [STAT_STATVFS || STAT_STATVFS64]: Include , , as they are needed for the 2.6 < glibc/Linux < 2.6.36 fallback. Problem reported by Ludovic Courtès in . --- ChangeLog | 7 +++++++ lib/fsusage.c | 21 ++++++++++++--------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index fda733e5f..47b1ae64f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2012-07-02 Paul Eggert + fsusage: include files needed for glibc 2.6 fallback + * lib/fsusage.c [STAT_STATVFS || STAT_STATVFS64]: + Include , , + as they are needed for the 2.6 < glibc/Linux < 2.6.36 fallback. + Problem reported by Ludovic Courtès in + . + fsusage: avoid needless check on GNU/Linux * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Omit STAT_STATFS3_OSF1 check on GNU/Linux systems, since it can't possibly work. diff --git a/lib/fsusage.c b/lib/fsusage.c index bca78ccf4..e273889e3 100644 --- a/lib/fsusage.c +++ b/lib/fsusage.c @@ -31,15 +31,6 @@ # include # include # include -# if HAVE_SYS_PARAM_H -# include -# endif -# if HAVE_SYS_MOUNT_H -# include -# endif -# if HAVE_SYS_VFS_H -# include -# endif # if HAVE_SYS_FS_S5PARAM_H /* Fujitsu UXP/V */ # include # endif @@ -55,6 +46,18 @@ # include "full-read.h" #endif +/* These files are needed for 2.6 < glibc/Linux < 2.6.36, even though + it has statvfs, because they are used by the fallback. */ +#if HAVE_SYS_PARAM_H +# include +#endif +#if HAVE_SYS_MOUNT_H +# include +#endif +#if HAVE_SYS_VFS_H +# include +#endif + /* The results of open() in this file are not used with fchdir, therefore save some unnecessary work in fchdir.c. */ #undef open -- 2.11.0