diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-06-23 11:01:31 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-06-23 11:01:31 -0600 |
commit | bc3108440bbec339f34e96849d7cd9de10bfd93d (patch) | |
tree | 4ce4dfe7edee08815ff5b4f7b6ebce19af8a066b /nuttx | |
parent | 8cf46d1f34452aca50d6aabe3d13bd12f54d5906 (diff) | |
download | nuttx-bc3108440bbec339f34e96849d7cd9de10bfd93d.tar.gz nuttx-bc3108440bbec339f34e96849d7cd9de10bfd93d.tar.bz2 nuttx-bc3108440bbec339f34e96849d7cd9de10bfd93d.zip |
Fix conditional compilation for CLOCK_MONTONIC. From Manuel Stühn
Diffstat (limited to 'nuttx')
-rw-r--r-- | nuttx/include/time.h | 2 | ||||
-rw-r--r-- | nuttx/sched/clock_gettime.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/nuttx/include/time.h b/nuttx/include/time.h index e8853ef89..414e19995 100644 --- a/nuttx/include/time.h +++ b/nuttx/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/nuttx/sched/clock_gettime.c b/nuttx/sched/clock_gettime.c index ebc06548d..c7beb8295 100644 --- a/nuttx/sched/clock_gettime.c +++ b/nuttx/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 <time.h>. This clock represents the |