From 3a7ed9689516c21254deaaf524d2cdb61609d495 Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Tue, 7 Feb 2017 23:22:38 +0100 Subject: [PATCH] [misc] Adding missing header for non-Posix timer platforms --- src/misc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/misc.c b/src/misc.c index 94d9f509..13c9e6a7 100644 --- a/src/misc.c +++ b/src/misc.c @@ -34,6 +34,9 @@ #include #include #include +#ifndef CLOCK_REALTIME +#include +#endif #include #include @@ -954,7 +957,7 @@ timespec_reltoabs(struct timespec relative) { struct timespec absolute; -#if _POSIX_TIMERS > 0 +#ifdef CLOCK_REALTIME clock_gettime(CLOCK_REALTIME, &absolute); #else struct timeval tv;