$NetBSD: patch-aj,v 1.1 2007/03/18 17:34:41 adam Exp $

--- mkspecs/netbsd-g++/qplatformdefs.h.orig	2006-11-27 17:26:42.000000000 +0000
+++ mkspecs/netbsd-g++/qplatformdefs.h
@@ -47,6 +47,7 @@
 #include <sys/types.h>
 #include <sys/ioctl.h>
 #include <sys/ipc.h>
+#include <sys/param.h>
 #include <sys/time.h>
 #include <sys/shm.h>
 #include <sys/socket.h>
@@ -107,10 +108,14 @@
 #define QT_SNPRINTF		::snprintf
 #define QT_VSNPRINTF		::vsnprintf
 
+#if (__NetBSD_Version__ >= 200040000)
+#include <sys/statvfs.h>
+#define QT_STATVFS		1
+#endif
+
 // Older NetBSD versions may still use the a.out format instead of ELF.
 #ifndef __ELF__
 #define QT_AOUT_UNDERSCORE
 #endif
 
-
 #endif // QPLATFORMDEFS_H
--- src/corelib/io/qsettings.cpp.orig	2006-11-27 17:26:06.000000000 +0000
+++ src/corelib/io/qsettings.cpp
@@ -105,9 +105,16 @@ inline bool qt_isEvilFsTypeName(const ch
 
 static bool isLikelyToBeNfs(int handle)
 {
+#ifdef QT_STATVFS
+    struct statvfs buf;
+    if (fstatvfs(handle, &buf) != 0)
+        return false;
+#else
     struct statfs buf;
     if (fstatfs(handle, &buf) != 0)
         return false;
+#endif
+
     return qt_isEvilFsTypeName(buf.f_fstypename);
 }
 
