[__GLIBC__]: GNU libc's statvfs stats each mount point in
[gnulib.git] / m4 / fsusage.m4
index 018563b..a0ab1e1 100644 (file)
@@ -1,4 +1,4 @@
-#serial 10
+#serial 11
 
 # From fileutils/configure.in
 
@@ -35,6 +35,11 @@ if test $ac_fsusage_space = no; then
   # SVR4
   AC_CACHE_CHECK([for statvfs function (SVR4)], fu_cv_sys_stat_statvfs,
                 [AC_TRY_LINK([#include <sys/types.h>
+#ifdef __GLIBC__
+Do not use statvfs on systems with GNU libc, because that function stats
+all preceding entries in /proc/mounts, and that makes df hang if even
+one of the corresponding file systems is hard-mounted, but not available.
+#endif
 #include <sys/statvfs.h>],
                              [struct statvfs fsd; statvfs (0, &fsd);],
                              fu_cv_sys_stat_statvfs=yes,