summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qstorageinfo_unix.cpp
diff options
context:
space:
mode:
authorPino Toscano <toscano.pino@tiscali.it>2021-11-21 09:25:30 +0100
committerThiago Macieira <thiago.macieira@intel.com>2022-01-16 11:59:39 +0000
commit5558eb4edb62ddc920fd5f4171e732fb7cbe53a7 (patch)
treec6870ff99507a9b43cef65c1879b668c880f68eb /src/corelib/io/qstorageinfo_unix.cpp
parentb387fbd1223a4b86164e0a9775afdb7baffea83a (diff)
QStorageInfo: limit Linux-only code with Q_OS_LINUX
This fixes a build problem (use of PATH_MAX) by eliminating a Linux-specific condition that can't happen on HURD anyway. Pick-to: 6.3 Change-Id: I5dcaf104a60b7850b8af3964fc4cd02ab24acd7b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qstorageinfo_unix.cpp')
-rw-r--r--src/corelib/io/qstorageinfo_unix.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/io/qstorageinfo_unix.cpp b/src/corelib/io/qstorageinfo_unix.cpp
index 566ffe46bc..2b635f63bb 100644
--- a/src/corelib/io/qstorageinfo_unix.cpp
+++ b/src/corelib/io/qstorageinfo_unix.cpp
@@ -568,6 +568,7 @@ inline QByteArray QStorageIterator::fileSystemType() const
inline QByteArray QStorageIterator::device() const
{
+#ifdef Q_OS_LINUX
// check that the device exists
if (mnt.mnt_fsname[0] == '/' && access(mnt.mnt_fsname, F_OK) != 0) {
// It doesn't, so let's try to resolve the dev_t from /dev/block.
@@ -583,6 +584,7 @@ inline QByteArray QStorageIterator::device() const
return dev;
}
}
+#endif
return QByteArray(mnt.mnt_fsname);
}