From 1638129ccbe9680a41859dc48d063a63ae103b1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Abecasis?= Date: Thu, 6 Jan 2011 17:16:20 +0100 Subject: 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 --- src/corelib/io/qfilesystemengine.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- cgit v0.12