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:
Revo 2020-02-23 14:35:34 -05:00 committed by GitHub
commit 6d7d1fde2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -8861,10 +8861,11 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
#ifdef TARGET_NR_stime /* not on alpha */
case TARGET_NR_stime:
{
time_t host_time;
if (get_user_sal(host_time, arg1))
struct timespec ts;
ts.tv_nsec = 0;
if (get_user_sal(ts.tv_sec, arg1))
goto efault;
ret = get_errno(stime(&host_time));
ret = get_errno(clock_settime(CLOCK_REALTIME, &ts));
}
break;
#endif