Fix conditional compilation for CLOCK_MONTONIC. From Manuel Stühn

This commit is contained in:
Gregory Nutt 2014-06-23 11:01:31 -06:00
parent 7e83501ce5
commit 0daf30675c
2 changed files with 2 additions and 2 deletions

View File

@ -99,7 +99,7 @@
* system time-of-day clock.
*/
#ifdef CLOCK_MONOTONIC
#ifdef CONFIG_CLOCK_MONOTONIC
# define CLOCK_MONOTONIC 2
#endif

View File

@ -107,7 +107,7 @@ int clock_gettime(clockid_t clock_id, struct timespec *tp)
sdbg("clock_id=%d\n", clock_id);
DEBUGASSERT(tp != NULL);
#ifdef CLOCK_MONOTONIC
#ifdef CONFIG_CLOCK_MONOTONIC
/* CLOCK_MONOTONIC is an optional under POSIX: "If the Monotonic Clock
* option is supported, all implementations shall support a clock_id
* of CLOCK_MONOTONIC defined in <time.h>. This clock represents the