1
1
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
2
- index b13a170e..5678c006 100644
2
+ index b13a170e..4af79175 100644
3
3
--- a/linux-user/syscall.c
4
4
+++ b/linux-user/syscall.c
5
5
@@ -111,6 +111,9 @@
@@ -43,7 +43,23 @@ index b13a170e..5678c006 100644
43
43
ts = (TaskState *)cpu->opaque;
44
44
if (flags & CLONE_SETTLS)
45
45
cpu_set_tls (env, newtls);
46
- @@ -10529,7 +10533,7 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,
46
+ @@ -7324,10 +7328,12 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,
47
+ #ifdef TARGET_NR_stime /* not on alpha */
48
+ case TARGET_NR_stime:
49
+ {
50
+ - time_t host_time;
51
+ - if (get_user_sal(host_time, arg1))
52
+ + struct timespec ts;
53
+ + ts.tv_nsec = 0;
54
+ + if (get_user_sal(ts.tv_sec, arg1)) {
55
+ return -TARGET_EFAULT;
56
+ - return get_errno(stime(&host_time));
57
+ + }
58
+ + return get_errno(clock_settime(CLOCK_REALTIME, &ts));
59
+ }
60
+ #endif
61
+ #ifdef TARGET_NR_alarm /* not on alpha */
62
+ @@ -10529,7 +10535,7 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,
47
63
return TARGET_PAGE_SIZE;
48
64
#endif
49
65
case TARGET_NR_gettid:
@@ -52,7 +68,7 @@ index b13a170e..5678c006 100644
52
68
#ifdef TARGET_NR_readahead
53
69
case TARGET_NR_readahead:
54
70
#if TARGET_ABI_BITS == 32
55
- @@ -10813,8 +10817 ,19 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,
71
+ @@ -10813,8 +10819 ,19 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,
56
72
return get_errno(safe_tkill((int)arg1, target_to_host_signal(arg2)));
57
73
58
74
case TARGET_NR_tgkill:
0 commit comments