$NetBSD$

--- configure.in.orig	2004-04-20 11:48:15.000000000 +0200
+++ configure.in
@@ -213,7 +213,10 @@ dnl
 dnl file system type member in statfs struct
 dnl
 AC_CHECK_MEMBERS([struct statfs.f_type], ,[
-  AC_CHECK_MEMBERS([struct statfs.f_fstyp], , , [#ifdef HAVE_SYS_VFS_H
+  AC_CHECK_MEMBERS([struct statfs.f_fstyp], , , [#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+#ifdef HAVE_SYS_VFS_H
 #include <sys/vfs.h>
 #endif
 #ifdef HAVE_SYS_MOUNT_H
@@ -221,7 +224,10 @@ AC_CHECK_MEMBERS([struct statfs.f_type],
 #endif
 #ifdef HAVE_SYS_STATFS_H
 #include <sys/statfs.h>
-#endif])], [#ifdef HAVE_SYS_VFS_H
+#endif])], [#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+#ifdef HAVE_SYS_VFS_H
 #include <sys/vfs.h>
 #endif
 #ifdef HAVE_SYS_MOUNT_H
@@ -236,6 +242,9 @@ dnl if statfs() takes 2 arguments or 4 (
 dnl
 AC_MSG_CHECKING([number of arguments to statfs()])
 AC_TRY_COMPILE([#include <unistd.h>
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
 #ifdef HAVE_SYS_VFS_H
 #include <sys/vfs.h>
 #endif
@@ -249,6 +258,9 @@ statfs(NULL, &st);],[
   AC_MSG_RESULT([2])
   AC_DEFINE(STATFS_ARGS, 2, [Number of arguments to statfs()])],[
   AC_TRY_COMPILE([#include <unistd.h>
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
 #ifdef HAVE_SYS_VFS_H
 #include <sys/vfs.h>
 #endif
@@ -262,7 +274,9 @@ statfs(NULL, &st, sizeof (st), 0);],[
     AC_MSG_RESULT([4])
     AC_DEFINE(STATFS_ARGS, 4, [Number of arguments to statfs()])],[
     AC_MSG_RESULT(unknown)
-    AC_MSG_ERROR([unable to determine number of arguments to statfs()])])])
+    if test "x`echo $ac_cv_func_statvfs | $as_tr_sh`" = "xno"; then
+        AC_MSG_ERROR([unable to determine number of arguments to statfs()])])
+    fi])
 
 AC_TYPE_MBSTATE_T
 
