diff options
-rw-r--r-- | src/time.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -10,8 +10,16 @@ | |||
10 | #include <sys/time.h> | 10 | #include <sys/time.h> |
11 | #endif | 11 | #endif |
12 | 12 | ||
13 | #ifndef HAVE_CLOCK_GETTIME | ||
14 | #ifdef __APPLE__ | 13 | #ifdef __APPLE__ |
14 | #include <AvailabilityMacros.h> | ||
15 | |||
16 | #ifndef MAC_OS_X_VERSION_10_12 | ||
17 | #define MAC_OS_X_VERSION_10_12 101200 | ||
18 | #endif | ||
19 | |||
20 | #define HAVE_CLOCK_GETTIME (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 || defined(CLOCK_MONOTONIC)) | ||
21 | |||
22 | #if !(HAVE_CLOCK_GETTIME) | ||
15 | #include "time_osx.h" | 23 | #include "time_osx.h" |
16 | #endif | 24 | #endif |
17 | #endif | 25 | #endif |