From 452e2348dabd640a915fba6ed335b13006e9fabf Mon Sep 17 00:00:00 2001 From: dob205 Date: Sun, 7 Nov 2021 18:00:18 +0100 Subject: [PATCH] Removes timespec_get() from Unix systems This change removes timespec_get() from Unix systems and makes it also possible to cross-compile binaries on macOS Big Sur or macOS Monterrey that target macOS Mojave at minimum since Mojave lacks support for timespec_get(). --- src/unix/unix_thread.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/unix/unix_thread.c b/src/unix/unix_thread.c index d95c337d1..f045d2820 100644 --- a/src/unix/unix_thread.c +++ b/src/unix/unix_thread.c @@ -101,11 +101,7 @@ thread_wait_event(event_t *handle, int timeout) event_pthread_t *event = (event_pthread_t *)handle; struct timespec abstime; -#ifdef HAS_TIMESPEC_GET - timespec_get(&abstime, TIME_UTC); -#else clock_gettime(CLOCK_REALTIME, &abstime); -#endif abstime.tv_nsec += (timeout % 1000) * 1000000; abstime.tv_sec += (timeout / 1000); if (abstime.tv_nsec > 1000000000) {