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.
This commit is contained in:
parent
ef34c4ce0f
commit
ae126d1009
14 changed files with 324 additions and 10 deletions
27
compat/clock_nanosleep/clock_nanosleep.h
Normal file
27
compat/clock_nanosleep/clock_nanosleep.h
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#ifdef __APPLE__
|
||||
|
||||
#ifndef CLOCK_NANOSLEEP_H
|
||||
#define CLOCK_NANOSLEEP_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
|
||||
|
||||
#ifndef TIMER_ABSTIME
|
||||
#define TIMER_ABSTIME 1
|
||||
#endif // TIMER_ABSTIME
|
||||
|
||||
struct timespec;
|
||||
|
||||
int clock_nanosleep (clockid_t id, int flags, const struct timespec *ts,
|
||||
struct timespec *ots);
|
||||
|
||||
#endif //CLOCK_NANOSLEEP_H
|
||||
#endif // __APPLE__
|
||||
Loading…
Add table
Add a link
Reference in a new issue