Sophie

Sophie

distrib > Mageia > cauldron > x86_64 > media > core-release-src > by-pkgid > 4c532bfb9916518564da5ba2805999f5 > files > 48

qtbase5-5.15.12-3.mga10.src.rpm

From 5121dd78bcd6ba0c002d977ad8060c87402f2a6c Mon Sep 17 00:00:00 2001
From: Jonas Kvinge <jonas@jkvinge.net>
Date: Mon, 16 Aug 2021 22:01:39 +0200
Subject: [PATCH 048/147] 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
Pick-to: 6.2
Change-Id: I0b29a4a1932425e1c4079aba6768fe94460c60af
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 4ddbfb68f858aee45cf7c33718f16b6c7b5beed7)
---
 src/corelib/io/qfilesystemengine_win.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp
index 002f720926..e6f118a5c4 100644
--- a/src/corelib/io/qfilesystemengine_win.cpp
+++ b/src/corelib/io/qfilesystemengine_win.cpp
@@ -664,14 +664,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)
-- 
2.40.1