summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorJonas Kvinge <jonas@jkvinge.net>2021-08-16 22:01:39 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-09-18 18:03:56 +0000
commitd5ad37b094a3ea1e24f343994bf7b6d5cd2df974 (patch)
tree7991df1dbd246f8730248bcae23e9fcab171b683 /src/corelib
parent6616eadcb23859ce0748dc6f974f2d91972f01a3 (diff)
Fix compile with MinGW-W64 9.0.0: Redefinition of 'struct _FILE_ID_INFO'
With MinGW-W64 9.0.0, _WIN32_WINNT is set to Windows 10 by default, so _FILE_ID_INFO is already defined. Fixes: QTBUG-94031 Change-Id: I0b29a4a1932425e1c4079aba6768fe94460c60af Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit 4ddbfb68f858aee45cf7c33718f16b6c7b5beed7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/io/qfilesystemengine_win.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp
index 075ce0ffac..0d3dd2e0b2 100644
--- a/src/corelib/io/qfilesystemengine_win.cpp
+++ b/src/corelib/io/qfilesystemengine_win.cpp
@@ -627,14 +627,14 @@ QFileSystemEntry QFileSystemEngine::absoluteName(const QFileSystemEntry &entry)
return QFileSystemEntry(ret, QFileSystemEntry::FromInternalPath());
}
-#if defined(Q_CC_MINGW) && WINVER < 0x0602 // Windows 8 onwards
+#if defined(Q_CC_MINGW) && WINVER < 0x0602 && _WIN32_WINNT < _WIN32_WINNT_WIN8 // Windows 8 onwards
typedef struct _FILE_ID_INFO {
ULONGLONG VolumeSerialNumber;
FILE_ID_128 FileId;
} FILE_ID_INFO, *PFILE_ID_INFO;
-#endif // if defined (Q_CC_MINGW) && WINVER < 0x0602
+#endif // if defined(Q_CC_MINGW) && WINVER < 0x0602 && _WIN32_WINNT < _WIN32_WINNT_WIN8
// File ID for Windows up to version 7 and FAT32 drives
static inline QByteArray fileId(HANDLE handle)