summaryrefslogtreecommitdiff
path: root/x11/qt4-libs/patches/patch-al
blob: f58d5d0a5b5ec55c98c0cf54b6769b5855b0042f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
$NetBSD: patch-al,v 1.9 2012/01/12 22:59:58 adam Exp $

--- src/corelib/io/qsettings.cpp.orig	2011-02-22 12:04:00.000000000 +0000
+++ src/corelib/io/qsettings.cpp
@@ -141,9 +141,16 @@ QT_END_INCLUDE_NAMESPACE
 
 Q_AUTOTEST_EXPORT_HELPER bool qIsLikelyToBeNfs(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);
 }
 
@@ -177,7 +184,7 @@ Q_AUTOTEST_EXPORT_HELPER bool qIsLikelyT
 
 #elif defined(Q_OS_SOLARIS) || defined(Q_OS_IRIX) || defined(Q_OS_AIX) || defined(Q_OS_HPUX) \
       || defined(Q_OS_OSF) || defined(Q_OS_QNX) || defined(Q_OS_SCO) \
-      || defined(Q_OS_UNIXWARE) || defined(Q_OS_RELIANT) || defined(Q_OS_NETBSD)
+      || defined(Q_OS_UNIXWARE) || defined(Q_OS_RELIANT)
 QT_BEGIN_INCLUDE_NAMESPACE
 # include <sys/statvfs.h>
 QT_END_INCLUDE_NAMESPACE