diff --git a/src/platforms/posix/px4_layer/drv_hrt.c b/src/platforms/posix/px4_layer/drv_hrt.c index e4839f0ac7..3bb8fa129f 100644 --- a/src/platforms/posix/px4_layer/drv_hrt.c +++ b/src/platforms/posix/px4_layer/drv_hrt.c @@ -86,6 +86,10 @@ static void hrt_unlock(void) #include #define CLOCK_REALTIME 0 +#ifndef CLOCK_MONOTONIC +#define CLOCK_MONOTONIC 1 +#endif + int px4_clock_gettime(clockid_t clk_id, struct timespec *tp) { struct timeval now;