From 8415be6e59aa2f8a23a3e484b1c8053f4d0c7206 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Mon, 17 Mar 2025 13:31:05 -0700 Subject: [PATCH] Headers: prefer `corecrt_malloc.h` to `malloc.h` This allows us to target a lower level library (corecrt) rather than the higher level library (ucrt) which can be helpful in modularising the SDK. --- clang/lib/Headers/mm_malloc.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/clang/lib/Headers/mm_malloc.h b/clang/lib/Headers/mm_malloc.h index d32fe59416277..addb598f62e45 100644 --- a/clang/lib/Headers/mm_malloc.h +++ b/clang/lib/Headers/mm_malloc.h @@ -13,7 +13,11 @@ #include #ifdef _WIN32 -#include +# if defined(__MINGW32__) +# include +# else +# include +# endif #else #ifndef __cplusplus extern int posix_memalign(void **__memptr, size_t __alignment, size_t __size);