From 5ce33c808919cc129fe04fa306ca64cdd9762248 Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4@ycbcr.xyz>
Date: Tue, 30 May 2023 15:52:28 +0200
Subject: [PATCH] headers: enable GET_MODULE_HANDLE_EX_xxx defines in UWP
 builds

It's available in the Windows 11 SDK for all builds targeting FAMILY_APP and more.
---
 mingw-w64-headers/include/libloaderapi.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/mingw-w64-headers/include/libloaderapi.h b/mingw-w64-headers/include/libloaderapi.h
index 26115ad9e..2705c18a4 100644
--- a/mingw-w64-headers/include/libloaderapi.h
+++ b/mingw-w64-headers/include/libloaderapi.h
@@ -79,11 +79,13 @@ extern "C" {
 #if (NTDDI_VERSION >= NTDDI_WIN10_RS2)
 #define LOAD_LIBRARY_OS_INTEGRITY_CONTINUITY 0x00008000
 #endif
+#endif /* WINAPI_PARTITION_DESKTOP */
 
 #define GET_MODULE_HANDLE_EX_FLAG_PIN (0x1)
 #define GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT (0x2)
 #define GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS (0x4)
 
+#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
 #define ENUMRESLANGPROC __MINGW_NAME_AW(ENUMRESLANGPROC)
 #define ENUMRESNAMEPROC __MINGW_NAME_AW(ENUMRESNAMEPROC)
 #define ENUMRESTYPEPROC __MINGW_NAME_AW(ENUMRESTYPEPROC)
-- 
2.37.3.windows.1

