diff --git a/include/time.h b/include/time.h index e8853ef8984..414e1999523 100644 --- a/include/time.h +++ b/include/time.h @@ -99,7 +99,7 @@ * system time-of-day clock. */ -#ifdef CLOCK_MONOTONIC +#ifdef CONFIG_CLOCK_MONOTONIC # define CLOCK_MONOTONIC 2 #endif diff --git a/sched/clock_gettime.c b/sched/clock_gettime.c index ebc06548d06..c7beb8295e3 100644 --- a/sched/clock_gettime.c +++ b/sched/clock_gettime.c @@ -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 . This clock represents the