check: Fix macro check for OS X
authorNirbheek Chauhan <nirbheek@centricular.com>
Fri, 9 Dec 2016 17:09:36 +0000 (22:39 +0530)
committerNirbheek Chauhan <nirbheek@centricular.com>
Fri, 9 Dec 2016 17:09:36 +0000 (22:39 +0530)
TARGET_OS_MAC is defined on all Apple platforms. You need to check for
!TARGET_OS_IPHONE to detect OS X (now called macOS).

libs/gst/check/libcheck/libcompat/clock_gettime.c

index 11e8f91..51cfd8f 100644 (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>