From: Nirbheek Chauhan Date: Wed, 2 Nov 2016 08:37:20 +0000 (+0530) Subject: clock_gettime.c: Use __APPLE__ instead of __MACH__ X-Git-Tag: 0.11.0~15^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=95563f6fa7c0b7574dc155c8eed0084c7ee1f09d;p=check clock_gettime.c: Use __APPLE__ instead of __MACH__ Hurd also defines __MACH__, but it does not have mach_absolute_time. Use the more strict __APPLE__ instead. --- diff --git a/lib/clock_gettime.c b/lib/clock_gettime.c index 6b37769..d9e354d 100644 --- a/lib/clock_gettime.c +++ b/lib/clock_gettime.c @@ -20,7 +20,7 @@ #include "libcompat.h" -#ifdef __MACH__ +#ifdef __APPLE__ #include #include #include @@ -35,8 +35,9 @@ int clock_gettime(clockid_t clk_id CK_ATTRIBUTE_UNUSED, struct timespec *ts) { -#ifdef __MACH__ - /* OS X does not have clock_gettime, use mach_absolute_time */ +#ifdef __APPLE__ + /* Some versions of macOS and iOS do not have clock_gettime, use + * mach_absolute_time */ static mach_timebase_info_data_t sTimebaseInfo; uint64_t rawTime;