mirror of
https://git.musl-libc.org/git/musl
synced 2025-01-10 00:32:27 +03:00
fix fallback code for old kernels in clock_gettime
This commit is contained in:
parent
3933fdd500
commit
805698401d
@ -10,7 +10,7 @@ static int sc_clock_gettime(clockid_t clk, struct timespec *ts)
|
||||
if (!r) return r;
|
||||
if (r == -ENOSYS) {
|
||||
if (clk == CLOCK_REALTIME) {
|
||||
__syscall(SYS_gettimeofday, clk, ts, 0);
|
||||
__syscall(SYS_gettimeofday, ts, 0);
|
||||
ts->tv_nsec = (int)ts->tv_nsec * 1000;
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user