Skip to content

Commit 8415be6

Browse files
committed
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.
1 parent 2e6402c commit 8415be6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

clang/lib/Headers/mm_malloc.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@
1313
#include <stdlib.h>
1414

1515
#ifdef _WIN32
16-
#include <malloc.h>
16+
# if defined(__MINGW32__)
17+
# include <malloc.h>
18+
# else
19+
# include <corecrt_malloc.h>
20+
# endif
1721
#else
1822
#ifndef __cplusplus
1923
extern int posix_memalign(void **__memptr, size_t __alignment, size_t __size);

0 commit comments

Comments
 (0)