Header typedef workaround for newer MacOS versions
Newish version of MacOS's time.h already `typedef`s `clockid_t` but doesn't seem to `#define` anything indicating such; as a workaround assume that `#ifdef CLOCK_MONOTONIC` on a Mac means that `clockid_t` has been `typedef`'d.
This commit is contained in:
parent
91e9635563
commit
8a6261d7c2
|
|
@ -3,9 +3,17 @@
|
|||
|
||||
#include <mach/mach_time.h> // 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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue