Skip to content

Commit 6d7d1fd

Browse files
authored
Merge pull request n64decomp#3 from pricechrispy/glibc2.31-stime
glibc2.31-stime: Fix build on glibc>=2.31 by replacing stime() with c…
2 parents 23b58bb + 3645241 commit 6d7d1fd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

linux-user/syscall.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8861,10 +8861,11 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
88618861
#ifdef TARGET_NR_stime /* not on alpha */
88628862
case TARGET_NR_stime:
88638863
{
8864-
time_t host_time;
8865-
if (get_user_sal(host_time, arg1))
8864+
struct timespec ts;
8865+
ts.tv_nsec = 0;
8866+
if (get_user_sal(ts.tv_sec, arg1))
88668867
goto efault;
8867-
ret = get_errno(stime(&host_time));
8868+
ret = get_errno(clock_settime(CLOCK_REALTIME, &ts));
88688869
}
88698870
break;
88708871
#endif

0 commit comments

Comments
 (0)