diff --git a/src/ChangeLog b/src/ChangeLog index bddaa88c..a2a62106 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2005-04-08 Hrvoje Niksic + * ptimer.c (ptimer_init): In fact, _POSIX_MONOTONIC_CLOCK needs to + be >= 0. + * ptimer.c (ptimer_init): Check whether _POSIX_MONOTONIC_CLOCK is defined instead of whether it's greater than 0. glibc defines it to 0, but still makes it available via sysconf. diff --git a/src/ptimer.c b/src/ptimer.c index 45a389a8..47980cfc 100644 --- a/src/ptimer.c +++ b/src/ptimer.c @@ -183,7 +183,7 @@ ptimer_init (void) { struct timespec res; -#ifdef _POSIX_MONOTONIC_CLOCK +#if _POSIX_MONOTONIC_CLOCK >= 0 /* -1 means not supported */ if (sysconf (_SC_MONOTONIC_CLOCK) > 0) posix_clock_id = CLOCK_MONOTONIC; else