clock_gettime.c: Use __APPLE__ instead of __MACH__
authorNirbheek Chauhan <nirbheek@centricular.com>
Wed, 2 Nov 2016 08:41:43 +0000 (14:11 +0530)
committerTim-Philipp Müller <tim@centricular.com>
Fri, 11 Nov 2016 13:33:10 +0000 (13:33 +0000)
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 0baa1f5c70c99c018eec16e1589444247f68af22..cc27e73835bc2a70151c1a759e608754295e35a2 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;