diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-12-09 01:26:55 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-12-10 11:02:16 +0100 |
commit | 2ca8cebac67cfa179af77aa8d507fd4b96b2b230 (patch) | |
tree | dcc10aa0a2dcf211e7865484deaf31343607158a /include/osmocom/core/timer_compat.h | |
parent | 4f4905fac590be8feea0b22010444ed40d7b11b5 (diff) |
timer: Fix clockid_t undefined on MacOS < 10.12
Related: OS#3722
Change-Id: If466a64bd44dcb8ae8a9b7f82bc9c9435ba3e640
Diffstat (limited to 'include/osmocom/core/timer_compat.h')
-rw-r--r-- | include/osmocom/core/timer_compat.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/osmocom/core/timer_compat.h b/include/osmocom/core/timer_compat.h index 8fdd0a08..916f5684 100644 --- a/include/osmocom/core/timer_compat.h +++ b/include/osmocom/core/timer_compat.h @@ -27,6 +27,10 @@ #pragma once +/* MacOS < 10.12 Sierra does not define clockid_t */ +#if defined(__APPLE__) && (!defined(__DARWIN_C_LEVEL) || __DARWIN_C_LEVEL < 199309L) +typedef int clockid_t; +#endif /* Convenience macros for operations on timevals. NOTE: `timercmp' does not work for >= or <=. */ |