Skip to content

Commit e9dcca4

Browse files
committed
rtc: Fix _gettimeofday timezone type
1 parent b1ce3b1 commit e9dcca4

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

teensy3/pins_teensy.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ void rtc_compensate(int adjust)
387387
}
388388

389389
__attribute__((weak))
390-
int _gettimeofday(struct timeval *tv, void *ignore)
390+
int _gettimeofday(struct timeval *tv, struct timezone *ignore)
391391
{
392392
uint32_t sec = RTC_TSR;
393393
uint32_t pre = RTC_TPR;
@@ -411,7 +411,7 @@ void rtc_set(unsigned long t) { }
411411
void rtc_compensate(int adjust) { }
412412

413413
__attribute__((weak))
414-
int _gettimeofday(struct timeval *tv, void *ignore) { return -1; }
414+
int _gettimeofday(struct timeval *tv, struct timezone *ignore) { return -1; }
415415

416416
#endif
417417

teensy4/rtc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ void rtc_compensate(int adjust __attribute__((unused)))
7272
// https://github.com/arduino-libraries/ArduinoBearSSL/issues/54
7373
// https://forum.pjrc.com/threads/70966
7474
__attribute__((weak))
75-
int _gettimeofday(struct timeval *tv, void *ignore __attribute__((unused)))
75+
int _gettimeofday(struct timeval *tv,
76+
struct timezone *ignore __attribute__((unused)))
7677
{
7778
uint32_t hi1 = SNVS_HPRTCMR;
7879
uint32_t lo1 = SNVS_HPRTCLR;

0 commit comments

Comments
 (0)