mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
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
This commit is contained in:
parent
7610e50fd0
commit
ca31500eb9
1 changed files with 2 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
#include "libcompat.h"
|
#include "libcompat.h"
|
||||||
|
|
||||||
#ifdef __MACH__
|
#ifdef __APPLE__
|
||||||
#include <mach/clock.h>
|
#include <mach/clock.h>
|
||||||
#include <mach/mach.h>
|
#include <mach/mach.h>
|
||||||
#include <mach/mach_time.h>
|
#include <mach/mach_time.h>
|
||||||
|
@ -15,7 +15,7 @@ int
|
||||||
clock_gettime (clockid_t clk_id CK_ATTRIBUTE_UNUSED, struct timespec *ts)
|
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 */
|
/* OS X does not have clock_gettime, use mach_absolute_time */
|
||||||
|
|
||||||
static mach_timebase_info_data_t sTimebaseInfo;
|
static mach_timebase_info_data_t sTimebaseInfo;
|
||||||
|
|
Loading…
Reference in a new issue