From 7097532ddfc043d04fcec75f90fc326ea555c623 Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Wed, 5 Mar 2025 21:14:48 +0000 Subject: [PATCH] Windows: Support newer mingw toolchains --- Source/Windows/Common/WinAPI/Alloc.cpp | 4 ++++ Source/Windows/include/winnt.h | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Source/Windows/Common/WinAPI/Alloc.cpp b/Source/Windows/Common/WinAPI/Alloc.cpp index 660f913a5..88e83f30b 100644 --- a/Source/Windows/Common/WinAPI/Alloc.cpp +++ b/Source/Windows/Common/WinAPI/Alloc.cpp @@ -72,6 +72,10 @@ DLLEXPORT_FUNC(WINBOOL, FlsFree, (DWORD dwFlsIndex)) { UNIMPLEMENTED(); } +DLLEXPORT_FUNC(HLOCAL, LocalFree, (HLOCAL hMem)) { + UNIMPLEMENTED(); +} + DLLEXPORT_FUNC(DWORD, TlsAlloc, ()) { RtlAcquirePebLock(); diff --git a/Source/Windows/include/winnt.h b/Source/Windows/include/winnt.h index 46d4163d5..ecd4ffa03 100644 --- a/Source/Windows/include/winnt.h +++ b/Source/Windows/include/winnt.h @@ -9,12 +9,12 @@ extern "C" { #endif -typedef struct _IMAGE_LOAD_CONFIG_CODE_INTEGRITY { +typedef struct ___IMAGE_LOAD_CONFIG_CODE_INTEGRITY { WORD Flags; WORD Catalog; DWORD CatalogOffset; DWORD Reserved; -} IMAGE_LOAD_CONFIG_CODE_INTEGRITY, *PIMAGE_LOAD_CONFIG_CODE_INTEGRITY; +} __IMAGE_LOAD_CONFIG_CODE_INTEGRITY, *__PIMAGE_LOAD_CONFIG_CODE_INTEGRITY; typedef struct __IMAGE_LOAD_CONFIG_DIRECTORY64 { DWORD Size; /* 000 */ @@ -42,7 +42,7 @@ typedef struct __IMAGE_LOAD_CONFIG_DIRECTORY64 { ULONGLONG GuardCFFunctionTable; /* 080 */ ULONGLONG GuardCFFunctionCount; DWORD GuardFlags; /* 090 */ - IMAGE_LOAD_CONFIG_CODE_INTEGRITY CodeIntegrity; + __IMAGE_LOAD_CONFIG_CODE_INTEGRITY CodeIntegrity; ULONGLONG GuardAddressTakenIatEntryTable; /* 0a0 */ ULONGLONG GuardAddressTakenIatEntryCount; ULONGLONG GuardLongJumpTargetTable; /* 0b0 */