summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Abecasis <joao.abecasis@nokia.com>2011-01-06 16:16:20 (GMT)
committerJoão Abecasis <joao.abecasis@nokia.com>2011-01-07 15:55:38 (GMT)
commit1638129ccbe9680a41859dc48d063a63ae103b1a (patch)
tree188a9862fd21711331cfe3136c53cc215f471be3
parent9a6cfc07e5ab21460cd85dbe6ac1f6de62c69524 (diff)
downloadQt-1638129ccbe9680a41859dc48d063a63ae103b1a.zip
Qt-1638129ccbe9680a41859dc48d063a63ae103b1a.tar.gz
Qt-1638129ccbe9680a41859dc48d063a63ae103b1a.tar.bz2
Fix compilation error on Solaris
d_type in dirent is a non-standard extension to POSIX available on some platforms (namely BSDs, Mac, Linux, Symbian). Taking the conservative approach and using this information only on platforms known to support it. Reviewed-by: Shane Kearns
-rw-r--r--src/corelib/io/qfilesystemengine.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/io/qfilesystemengine.cpp b/src/corelib/io/qfilesystemengine.cpp
index d9d802e..9446ebb 100644
--- a/src/corelib/io/qfilesystemengine.cpp
+++ b/src/corelib/io/qfilesystemengine.cpp
@@ -289,6 +289,9 @@ void QFileSystemMetaData::fillFromStatBuf(const QT_STATBUF &statBuffer)
void QFileSystemMetaData::fillFromDirEnt(const QT_DIRENT &entry)
{
+#if defined(_DIRENT_HAVE_D_TYPE) || defined(Q_OS_BSD4) || defined(Q_OS_SYMBIAN)
+ // BSD4 includes Mac OS X
+
// ### This will clear all entry flags and knownFlagsMask
switch (entry.d_type)
{
@@ -344,6 +347,9 @@ void QFileSystemMetaData::fillFromDirEnt(const QT_DIRENT &entry)
default:
clear();
}
+#else
+ Q_UNUSED(entry)
+#endif
}
#endif