提交 80569840 编写于 作者: R Rich Felker

fix fallback code for old kernels in clock_gettime

上级 3933fdd5
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册