dump1090/compat/clock_gettime/clock_gettime.h
David Stipp ae126d1009 Add back Darwin/Mach/Apple portability
Quite a few of the changes against the MalcolmRobb/dump1090 fork are
incompatible with OSX.  This patch adds back that cross platform support
back.
2015-09-05 14:42:11 -04:00

26 lines
457 B
C

#ifdef __APPLE__
#ifndef CLOCK_GETTIME_H
#define CLOCK_GETTIME_H
#include <mach/mach_time.h>
#ifndef CLOCKID_T
#define CLOCKID_T
typedef enum
{
CLOCK_REALTIME,
CLOCK_MONOTONIC,
CLOCK_PROCESS_CPUTIME_ID,
CLOCK_THREAD_CPUTIME_ID
} clockid_t;
#endif // CLOCKID_T
struct timespec;
static mach_timebase_info_data_t __clock_gettime_inf;
int clock_gettime(clockid_t clk_id, struct timespec *tp);
#endif // CLOCK_GETTIME_H
#endif // __APPLE__