-
Notifications
You must be signed in to change notification settings - Fork 971
Description
The file src/prim/unix/prim.c
references 2 preprocessor symbols TARGET_IOS_IPHONE
and TARGET_IOS_SIMULATOR
.
These symbols don't exist in the macOS 14 or iOS 17 SDKs. I suspect they should be TARGET_OS_IPHONE
and TARGET_OS_SIMULATOR
.
Alternatively, if the intention is to only include the header on macOS, #if !defined(TARGET_OS_OSX) || TARGET_OS_OSX
would allow an explicit check that the platform is macOS (rather than "not not iPhone"), allowing for older macOS SDKs that predate the introduction of TARGET_OS_OSX
.
That said, it's also not clear to me that the branch is needed at all, as mach/vm_statistics.h
exists in the iOS 17 SDK. However, I'm not sufficiently familiar with what the code is doing in this case to comment. I'm not sure if this wasn't the case on older iOS SDKs.