clock_gettime.c: Use __APPLE__ instead of __MACH__
authorNirbheek Chauhan <nirbheek@centricular.com>
Wed, 2 Nov 2016 08:41:43 +0000 (14:11 +0530)
committerNirbheek Chauhan <nirbheek@centricular.com>
Wed, 2 Nov 2016 08:42:32 +0000 (14:12 +0530)
Hurd also defines __MACH__, but it does not have mach_absolute_time. Use
the more strict __APPLE__ instead.

Has also been sent upstream: https://github.com/libcheck/check/pull/65

libs/gst/check/libcheck/clock_gettime.c

index 0baa1f5..cc27e73 100644 (file)
@@ -1,6 +1,6 @@
 #include "libcompat.h"
 
-#ifdef __MACH__
+#ifdef __APPLE__
 #include <mach/clock.h>
 #include <mach/mach.h>
 #include <mach/mach_time.h>
@@ -15,7 +15,7 @@ int
 clock_gettime (clockid_t clk_id CK_ATTRIBUTE_UNUSED, struct timespec *ts)
 {
 
-#ifdef __MACH__
+#ifdef __APPLE__
   /* OS X does not have clock_gettime, use mach_absolute_time */
 
   static mach_timebase_info_data_t sTimebaseInfo;