Avoid defining AC_USE_SYSTEM_EXTENSIONS here.
[gnulib.git] / m4 / ls-mntd-fs.m4
index c299331..21ac4e7 100644 (file)
@@ -1,4 +1,4 @@
-#serial 22
+#serial 26
 # How to list mounted file systems.
 
 # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006 Free Software
@@ -141,7 +141,8 @@ if test $ac_cv_func_getmntent = yes; then
 # endif
 #endif
 ],
-                    [ struct mntent *mnt = 0; char *table = MOUNTED; ],
+                    [ struct mntent *mnt = 0; char *table = MOUNTED;
+                     if (sizeof mnt && sizeof table) return 0;],
                    fu_cv_sys_mounted_getmntent1=yes,
                    fu_cv_sys_mounted_getmntent1=no)])
     AC_MSG_RESULT($fu_cv_sys_mounted_getmntent1)
@@ -167,6 +168,7 @@ if test $ac_cv_func_getmntent = yes; then
       AC_DEFINE(MOUNTED_GETMNTENT2, 1,
         [Define if there is a function named getmntent for reading the list of
          mounted file systems, and that function takes two arguments.  (SVR4)])
+      AC_CHECK_FUNCS(hasmntopt)
     fi
   fi
 
@@ -236,6 +238,9 @@ if test -z "$ac_list_mounted_fs"; then
     AC_CACHE_VAL(fu_cv_sys_mounted_getmntinfo2,
       [
         AC_TRY_COMPILE([
+#if HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
 #include <sys/types.h>
 #if HAVE_SYS_MOUNT_H
 # include <sys/mount.h>