Skip to content

Commit e76913f

Browse files
committed
pythongh-117891: handle undefined TARGET_OS_OSX
This macro is not defined by older macOS SDKs, and the code previously didn't distinguish between it being undefined and being defined to 0.
1 parent 7d0be7a commit e76913f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Modules/_testexternalinspection.c

+5
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717

1818
#if defined(__APPLE__)
1919
# include <TargetConditionals.h>
20+
// TARGET_OS_OSX is not defined by older macOS SDKs. It is always
21+
// defined to 0 when targeting iOS.
22+
# ifndef TARGET_OS_OSX
23+
# define TARGET_OS_OSX 1
24+
# endif
2025
# if TARGET_OS_OSX
2126
# include <libproc.h>
2227
# include <mach-o/fat.h>

0 commit comments

Comments
 (0)