From 438ead65f9f745699c97c59d51069d8a366a216b Mon Sep 17 00:00:00 2001 From: Charlie Lenahan Date: Mon, 13 Apr 2015 17:26:28 -0400 Subject: [PATCH] fix for os x build This is a followup to https://gerrit.iotivity.org/gerrit/#/c/677/ Apple defines _POSIX_TIMERS as (-1) , thus the need to check for both Change-Id: I8a852febd45133177706a1d529040fce704200f9 Signed-off-by: Charlie Lenahan Reviewed-on: https://gerrit.iotivity.org/gerrit/706 Reviewed-by: Thuyen Tran Tested-by: jenkins-iotivity Reviewed-by: Erich Keane --- resource/csdk/logger/src/logger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resource/csdk/logger/src/logger.c b/resource/csdk/logger/src/logger.c index 8f4e809..b642464 100644 --- a/resource/csdk/logger/src/logger.c +++ b/resource/csdk/logger/src/logger.c @@ -130,7 +130,7 @@ static void osalGetTime(int *min,int *sec, int *ms) { if (min && sec && ms) { -#ifdef _POSIX_TIMERS +#if defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0 struct timespec when = {}; clockid_t clk = CLOCK_REALTIME; #ifdef CLOCK_REALTIME_COARSE -- 2.7.4