diff --git a/sched/clock/clock_systimespec.c b/sched/clock/clock_systimespec.c index c24daa70c22..1c5362637b9 100644 --- a/sched/clock/clock_systimespec.c +++ b/sched/clock/clock_systimespec.c @@ -44,6 +44,7 @@ #include #include +#include #include "clock/clock.h" @@ -85,7 +86,7 @@ int clock_systimespec(FAR struct timespec *ts) { /* Get the hi-resolution time from the RTC */ - return up_rtc_gettime(tp); + return up_rtc_gettime(ts); } else #endif