summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
7f671b1)
clock_gettime and CLOCK_MONOTONIC are supported now
Signed-off-by: Felix Fietkau <nbd@nbd.name>
+#ifdef LIBUBOX_COMPAT_CLOCK_GETTIME
#include <mach/mach_host.h> /* host_get_clock_service() */
#include <mach/mach_port.h> /* mach_port_deallocate() */
#include <mach/mach_init.h> /* mach_host_self(), mach_task_self() */
#include <mach/mach_host.h> /* host_get_clock_service() */
#include <mach/mach_port.h> /* mach_port_deallocate() */
#include <mach/mach_init.h> /* mach_host_self(), mach_task_self() */
#define BUILD_BUG_ON __BUILD_BUG_ON
#endif
#define BUILD_BUG_ON __BUILD_BUG_ON
#endif
+#if defined(__APPLE__) && !defined(CLOCK_MONOTONIC)
+#define LIBUBOX_COMPAT_CLOCK_GETTIME
#include <mach/clock_types.h>
#define CLOCK_REALTIME CALENDAR_CLOCK
#include <mach/clock_types.h>
#define CLOCK_REALTIME CALENDAR_CLOCK