check: Fix macro check for OS X

TARGET_OS_MAC is defined on all Apple platforms. You need to check for
!TARGET_OS_IPHONE to detect OS X (now called macOS).
This commit is contained in:
Nirbheek Chauhan 2016-12-09 22:39:36 +05:30
parent d284be3505
commit f8df150e29

View file

@ -25,7 +25,8 @@
#include <mach/mach.h>
#include <mach/mach_time.h>
#include <TargetConditionals.h>
# if TARGET_OS_MAC
/* CoreServices.h is only available on macOS */
# if TARGET_OS_MAC && !TARGET_OS_IPHONE
# include <CoreServices/CoreServices.h>
# endif
#include <unistd.h>