diff --git a/cpu/native/rtc/posix-rtc.c b/cpu/native/rtc/posix-rtc.c index b08f526fb8..f917d41018 100644 --- a/cpu/native/rtc/posix-rtc.c +++ b/cpu/native/rtc/posix-rtc.c @@ -73,12 +73,10 @@ time_t rtc_time(struct timeval *time) { if (native_rtc_enabled == 1) { _native_in_syscall++; - if (gettimeofday(time, 0) == 0) { - errx(1, "rtc_time: gettimeofday: error"); + if (gettimeofday(time, NULL) == -1) { + err(1, "rtc_time: gettimeofday"); } _native_in_syscall--; } return time->tv_sec; } - -