From 6cf7d81c9b1be85662f4651c713710bacae29782 Mon Sep 17 00:00:00 2001 From: Fabrice de Gans Date: Thu, 5 Jun 2025 10:07:20 -0700 Subject: [PATCH] Include last (#1330) Starting with the Windows SDK 10.0.26100.3916, inclusion of `` clashes with some of the definitions in other ucrt headers. Move `` to be last to work around this issue. --- Sources/_FoundationCShims/include/_CStdlib.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Sources/_FoundationCShims/include/_CStdlib.h b/Sources/_FoundationCShims/include/_CStdlib.h index 408a92404..f462ba186 100644 --- a/Sources/_FoundationCShims/include/_CStdlib.h +++ b/Sources/_FoundationCShims/include/_CStdlib.h @@ -101,10 +101,6 @@ #include #endif -#if __has_include() -#include -#endif - #if __has_include() #include #endif @@ -164,5 +160,10 @@ #endif +// Must be last to avoid conflicts with other headers on Windows. +#if __has_include() +#include +#endif + #endif // FOUNDATION_CSTDLIB