From 13972476ad2c3178fe89f2d96f398de10394c6f6 Mon Sep 17 00:00:00 2001 From: Dmitry Shachnev Date: Mon, 22 Dec 2014 13:44:45 +0300 Subject: qstorageinfo_unix.cpp: Fix build on BSD and other unices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 Reviewed-by: Lisandro Damián Nicanor Pérez Meyer Reviewed-by: Allan Sandfeld Jensen Reviewed-by: Shawn Rutledge --- src/corelib/io/qstorageinfo_unix.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/corelib/io/qstorageinfo_unix.cpp') 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 +# include #elif defined(Q_OS_ANDROID) # include # include # include -#elif defined(Q_OS_QNX) -# include #elif defined(Q_OS_LINUX) # include # include #elif defined(Q_OS_SOLARIS) # include +#else +# include #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) -- cgit v1.2.3