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 <charlie.lenahan@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/706
Reviewed-by: Thuyen Tran <thuyen.c.tran@intel.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
{
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