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>
This commit is contained in:
parent
c63bb90ac7
commit
13972476ad
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user