diff --git a/compat/clock_gettime/clock_gettime.h b/compat/clock_gettime/clock_gettime.h index 83fdac7..3c4c29b 100644 --- a/compat/clock_gettime/clock_gettime.h +++ b/compat/clock_gettime/clock_gettime.h @@ -3,9 +3,17 @@ #include // Apple-only, but this isn't inclued on other BSDs +#ifdef __OpenBSD__ #ifdef _CLOCKID_T_DEFINED_ #define CLOCKID_T #endif +#endif + +#ifdef __APPLE__ +#ifdef CLOCK_MONOTONIC +#define CLOCKID_T +#endif +#endif #ifndef CLOCKID_T #define CLOCKID_T diff --git a/compat/clock_nanosleep/clock_nanosleep.h b/compat/clock_nanosleep/clock_nanosleep.h index 9a8da5d..34eb801 100644 --- a/compat/clock_nanosleep/clock_nanosleep.h +++ b/compat/clock_nanosleep/clock_nanosleep.h @@ -1,9 +1,17 @@ #ifndef CLOCK_NANOSLEEP_H #define CLOCK_NANOSLEEP_H +#ifdef __OpenBSD__ #ifdef _CLOCKID_T_DEFINED_ #define CLOCKID_T #endif +#endif + +#ifdef __APPLE__ +#ifdef CLOCK_MONOTONIC +#define CLOCKID_T +#endif +#endif #ifndef CLOCKID_T #define CLOCKID_T