Commit 9f4f16df authored by Nirbheek Chauhan's avatar Nirbheek Chauhan 🐜

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.

Has also been sent upstream: https://github.com/libcheck/check/pull/65
parent 2797376f
#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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment