From c169f4b833479afffe4a3596771c7d0617c6e7be Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Thu, 16 Apr 2020 23:56:36 +0200 Subject: [PATCH] Use nanosleep() instead of clock_nanosleep(). Mac OS X does not support the latter. --- src/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net.c b/src/net.c index cfb4d177..6fd90e19 100644 --- a/src/net.c +++ b/src/net.c @@ -354,7 +354,7 @@ static void periodic_handler(event_loop_t *loop, void *data) { if(mesh->contradicting_del_edge > 100 && mesh->contradicting_add_edge > 100) { logger(mesh, MESHLINK_WARNING, "Possible node with same Name as us! Sleeping %d seconds.", mesh->sleeptime); struct timespec ts = {mesh->sleeptime, 0}; - clock_nanosleep(CLOCK_MONOTONIC, 0, &ts, NULL); + nanosleep(&ts, NULL); mesh->sleeptime *= 2; if(mesh->sleeptime < 0) { -- 2.39.5