QNX: Fix build with QNX SDP 6.5.
authorSergio Martins <sergio.martins.qnx@kdab.com>
Fri, 2 Nov 2012 11:48:49 +0000 (11:48 +0000)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 2 Nov 2012 17:07:35 +0000 (18:07 +0100)
__EXT_LF64SRC isn't defined in this case.

This also makes it consistent with mkspecs/common/posix/qplatformdefs.h
which uses QT_USE_XOPEN_LFS_EXTENSIONS and QT_LARGEFILE_SUPPORT
to decide which type of stat struct to declare.

Change-Id: Iaa155acc270783901376b543fdeffb5263294754
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
src/corelib/io/qfilesystemengine.cpp

index 8707aec..4564ede 100644 (file)
@@ -315,7 +315,7 @@ void QFileSystemMetaData::fillFromDirEnt(const QT_DIRENT &entry)
             if (S_ISLNK(extra_stat->d_stat.st_mode) && extra->d_type == _DTYPE_LSTAT)
                 continue;
 
             if (S_ISLNK(extra_stat->d_stat.st_mode) && extra->d_type == _DTYPE_LSTAT)
                 continue;
 
-#if defined(__EXT_LF64SRC)
+#if defined(QT_USE_XOPEN_LFS_EXTENSIONS) && defined(QT_LARGEFILE_SUPPORT)
             // Even with large file support, d_stat is always of type struct stat, not struct stat64,
             // so it needs to be converted
             struct stat64 statBuf;
             // Even with large file support, d_stat is always of type struct stat, not struct stat64,
             // so it needs to be converted
             struct stat64 statBuf;