Skip to content

Commit 6e8f249

Browse files
1 parent 3ac568c commit 6e8f249

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

qemu_mode/patches/syscall.diff

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
2-
index b13a170e..5678c006 100644
2+
index b13a170e..4af79175 100644
33
--- a/linux-user/syscall.c
44
+++ b/linux-user/syscall.c
55
@@ -111,6 +111,9 @@
@@ -43,7 +43,23 @@ index b13a170e..5678c006 100644
4343
ts = (TaskState *)cpu->opaque;
4444
if (flags & CLONE_SETTLS)
4545
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,
4763
return TARGET_PAGE_SIZE;
4864
#endif
4965
case TARGET_NR_gettid:
@@ -52,7 +68,7 @@ index b13a170e..5678c006 100644
5268
#ifdef TARGET_NR_readahead
5369
case TARGET_NR_readahead:
5470
#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,
5672
return get_errno(safe_tkill((int)arg1, target_to_host_signal(arg2)));
5773

5874
case TARGET_NR_tgkill:

0 commit comments

Comments
 (0)