Build hwclock when gettimeofday() syscall unavailable.

This commit is contained in:
Rob Landley 2024-08-11 15:41:07 -05:00
parent d9d0a1c6e6
commit 203458d4ea

View File

@ -41,7 +41,11 @@ GLOBALS(
// Bug workaround for musl commit 2c2c3605d3b3 which rewrote the syscall
// wrapper to not use the syscall, which is the only way to set kernel's sys_tz
#ifdef _NR_settimeofday
#define settimeofday(x, tz) syscall(__NR_settimeofday, (void *)0, (void *)tz)
#else
#define settimeofday(x, tz) ((tz)->tz_minuteswest = 0)
#endif
void hwclock_main()
{