Merge pull request #3 from pricechrispy/glibc2.31-stime
glibc2.31-stime: Fix build on glibc>=2.31 by replacing stime() with c…
This commit is contained in:
commit
6d7d1fde2f
|
@ -8861,10 +8861,11 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
|
||||||
#ifdef TARGET_NR_stime /* not on alpha */
|
#ifdef TARGET_NR_stime /* not on alpha */
|
||||||
case TARGET_NR_stime:
|
case TARGET_NR_stime:
|
||||||
{
|
{
|
||||||
time_t host_time;
|
struct timespec ts;
|
||||||
if (get_user_sal(host_time, arg1))
|
ts.tv_nsec = 0;
|
||||||
|
if (get_user_sal(ts.tv_sec, arg1))
|
||||||
goto efault;
|
goto efault;
|
||||||
ret = get_errno(stime(&host_time));
|
ret = get_errno(clock_settime(CLOCK_REALTIME, &ts));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue