summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qiodevice.cpp2
-rw-r--r--src/corelib/io/qstorageinfo_unix.cpp7
2 files changed, 5 insertions, 4 deletions
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
index 36f88f2774..d7ce8731c5 100644
--- a/src/corelib/io/qiodevice.cpp
+++ b/src/corelib/io/qiodevice.cpp
@@ -1004,7 +1004,7 @@ QByteArray QIODevice::readAll()
} else {
// Read it all in one go.
// If resize fails, don't read anything.
- if (readBytes + theSize - d->pos > INT_MAX)
+ if (quint64(readBytes + theSize - d->pos) > QByteArray::MaxSize)
return QByteArray();
result.resize(int(readBytes + theSize - d->pos));
readBytes += read(result.data() + readBytes, result.size() - readBytes);
diff --git a/src/corelib/io/qstorageinfo_unix.cpp b/src/corelib/io/qstorageinfo_unix.cpp
index bec7420dc7..1af2145296 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)