diff options
Diffstat (limited to 'src/corelib/io/qstorageinfo_unix.cpp')
-rw-r--r-- | src/corelib/io/qstorageinfo_unix.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/corelib/io/qstorageinfo_unix.cpp b/src/corelib/io/qstorageinfo_unix.cpp index 7b8f608050..7823787711 100644 --- a/src/corelib/io/qstorageinfo_unix.cpp +++ b/src/corelib/io/qstorageinfo_unix.cpp @@ -49,7 +49,7 @@ # include <sys/mount.h> # include <sys/vfs.h> # include <mntent.h> -#elif defined(Q_OS_LINUX) +#elif defined(Q_OS_LINUX) || defined(Q_OS_HURD) # include <mntent.h> # include <sys/statvfs.h> #elif defined(Q_OS_SOLARIS) @@ -137,7 +137,7 @@ private: QByteArray m_rootPath; QByteArray m_fileSystemType; QByteArray m_device; -#elif defined(Q_OS_LINUX) +#elif defined(Q_OS_LINUX) || defined(Q_OS_HURD) FILE *fp; mntent mnt; QByteArray buffer; @@ -279,10 +279,11 @@ inline QByteArray QStorageIterator::device() const return m_device; } -#elif defined(Q_OS_LINUX) +#elif defined(Q_OS_LINUX) || defined(Q_OS_HURD) static const char pathMounted[] = "/etc/mtab"; -static const int bufferSize = 3*PATH_MAX; // 2 paths (mount point+device) and metainfo +static const int bufferSize = 1024; // 2 paths (mount point+device) and metainfo; + // should be enough inline QStorageIterator::QStorageIterator() : buffer(QByteArray(bufferSize, 0)) |