Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions teensy3/pins_teensy.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ void rtc_compensate(int adjust)
}

__attribute__((weak))
int _gettimeofday(struct timeval *tv, void *ignore)
int _gettimeofday(struct timeval *tv, struct timezone *ignore)
{
uint32_t sec = RTC_TSR;
uint32_t pre = RTC_TPR;
Expand All @@ -411,7 +411,7 @@ void rtc_set(unsigned long t) { }
void rtc_compensate(int adjust) { }

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

#endif

Expand Down
3 changes: 2 additions & 1 deletion teensy4/rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ void rtc_compensate(int adjust __attribute__((unused)))
// https://github.com/arduino-libraries/ArduinoBearSSL/issues/54
// https://forum.pjrc.com/threads/70966
__attribute__((weak))
int _gettimeofday(struct timeval *tv, void *ignore __attribute__((unused)))
int _gettimeofday(struct timeval *tv,
struct timezone *ignore __attribute__((unused)))
{
uint32_t hi1 = SNVS_HPRTCMR;
uint32_t lo1 = SNVS_HPRTCLR;
Expand Down