Skip to content

Commit 2ee9742

Browse files
committed
gh-142721: Use the correct macros defined in TargerConditionals for Apple
mach/vm_statistics.h was always included because #if !TARGET_IOS_IPHONE && !TARGET_IOS_SIMULATOR resolved to true, always.
1 parent 3596dba commit 2ee9742

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Corrected the macro names for conditional Apple targets.

Objects/mimalloc/prim/unix/prim.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ terms of the MIT license. A copy of the license can be found in the file
3939
#endif
4040
#elif defined(__APPLE__)
4141
#include <TargetConditionals.h>
42-
#if !TARGET_IOS_IPHONE && !TARGET_IOS_SIMULATOR
42+
#if !TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR
4343
#include <mach/vm_statistics.h>
4444
#endif
4545
#elif defined(__FreeBSD__) || defined(__DragonFly__)

0 commit comments

Comments
 (0)