summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qstorageinfo_unix.cpp
diff options
context:
space:
mode:
authorDmitry Shachnev <mitya57@gmail.com>2014-12-22 13:44:45 +0300
committerShawn Rutledge <shawn.rutledge@digia.com>2014-12-23 09:12:01 +0100
commit13972476ad2c3178fe89f2d96f398de10394c6f6 (patch)
tree108bc117eb2e7bd5eb1bdfcb6e0cea9ff64af7bd /src/corelib/io/qstorageinfo_unix.cpp
parentc63bb90ac7224927b56197d80252c79d01ff3b6f (diff)
qstorageinfo_unix.cpp: Fix build on BSD and other unices
* Include statvfs.h on all non-Linux and non-Solaris systems. * Fix type of stat_buf structure on BSD. Change-Id: I6336503082fafd7f6108cf95c079bdd329d2ea0f Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src/corelib/io/qstorageinfo_unix.cpp')
-rw-r--r--src/corelib/io/qstorageinfo_unix.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/corelib/io/qstorageinfo_unix.cpp b/src/corelib/io/qstorageinfo_unix.cpp
index e82737c51c..857464f578 100644
--- a/src/corelib/io/qstorageinfo_unix.cpp
+++ b/src/corelib/io/qstorageinfo_unix.cpp
@@ -52,17 +52,18 @@
#if defined(Q_OS_BSD4)
# include <sys/mount.h>
+# include <sys/statvfs.h>
#elif defined(Q_OS_ANDROID)
# include <sys/mount.h>
# include <sys/vfs.h>
# include <mntent.h>
-#elif defined(Q_OS_QNX)
-# include <sys/statvfs.h>
#elif defined(Q_OS_LINUX)
# include <mntent.h>
# include <sys/statvfs.h>
#elif defined(Q_OS_SOLARIS)
# include <sys/mnttab.h>
+#else
+# include <sys/statvfs.h>
#endif
#if defined(Q_OS_BSD4)
@@ -118,7 +119,7 @@ public:
inline QByteArray device() const;
private:
#if defined(Q_OS_BSD4)
- statfs *stat_buf;
+ struct statfs *stat_buf;
int entryCount;
int currentIndex;
#elif defined(Q_OS_SOLARIS)