From cf7061b9a82db766c67df402f9976e59368dd85b Mon Sep 17 00:00:00 2001 From: seth Date: Wed, 7 May 2025 17:42:30 -0400 Subject: [PATCH] fix(FileSystem): dont re-define structs for newer mingw versions Signed-off-by: seth --- launcher/FileSystem.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/launcher/FileSystem.cpp b/launcher/FileSystem.cpp index 08dc7d2cc..ecb1e42d2 100644 --- a/launcher/FileSystem.cpp +++ b/launcher/FileSystem.cpp @@ -107,6 +107,10 @@ namespace fs = std::filesystem; #if defined(__MINGW32__) +// Avoid re-defining structs retroactively added to MinGW +// https://github.com/mingw-w64/mingw-w64/issues/90#issuecomment-2829284729 +#if __MINGW64_VERSION_MAJOR < 13 + struct _DUPLICATE_EXTENTS_DATA { HANDLE FileHandle; LARGE_INTEGER SourceFileOffset; @@ -116,6 +120,7 @@ struct _DUPLICATE_EXTENTS_DATA { using DUPLICATE_EXTENTS_DATA = _DUPLICATE_EXTENTS_DATA; using PDUPLICATE_EXTENTS_DATA = _DUPLICATE_EXTENTS_DATA*; +#endif struct _FSCTL_GET_INTEGRITY_INFORMATION_BUFFER { WORD ChecksumAlgorithm; // Checksum algorithm. e.g. CHECKSUM_TYPE_UNCHANGED, CHECKSUM_TYPE_NONE, CHECKSUM_TYPE_CRC32