@@ -143,6 +143,7 @@ AC_HAVE_FSETXATTR
AC_HAVE_MREMAP
AC_NEED_INTERNAL_FSXATTR
AC_HAVE_GETFSMAP
+AC_HAVE_STATFS_FLAGS
if test "$enable_blkid" = yes; then
AC_HAVE_BLKID_TOPO
@@ -113,6 +113,7 @@ HAVE_FSETXATTR = @have_fsetxattr@
HAVE_MREMAP = @have_mremap@
NEED_INTERNAL_FSXATTR = @need_internal_fsxattr@
HAVE_GETFSMAP = @have_getfsmap@
+HAVE_STATFS_FLAGS = @have_statfs_flags@
GCCFLAGS = -funsigned-char -fno-strict-aliasing -Wall
# -Wbitwise -Wno-transparent-union -Wno-old-initializer -Wno-decl
@@ -199,7 +199,9 @@ statfs_f(
printf(_("statfs.f_bavail = %lld\n"), (long long) st.f_bavail);
printf(_("statfs.f_files = %lld\n"), (long long) st.f_files);
printf(_("statfs.f_ffree = %lld\n"), (long long) st.f_ffree);
+#ifdef HAVE_STATFS_FLAGS
printf(_("statfs.f_flags = 0x%llx\n"), (long long) st.f_flags);
+#endif
}
if (file->flags & IO_FOREIGN)
return 0;
@@ -297,3 +297,17 @@ AC_DEFUN([AC_HAVE_GETFSMAP],
AC_MSG_RESULT(no))
AC_SUBST(have_getfsmap)
])
+
+AC_DEFUN([AC_HAVE_STATFS_FLAGS],
+ [
+ AC_CHECK_TYPE(struct statfs,
+ [
+ AC_CHECK_MEMBER(struct statfs.f_flags,
+ have_statfs_flags=yes,,
+ [#include <sys/vfs.h>]
+ )
+ ],,
+ [#include <sys/vfs.h>]
+ )
+ AC_SUBST(have_statfs_flags)
+ ])