1 # Since the syscallx macros seem to be under threat, this patch stops
2 # using them, using syscall instead.
4 Index: linux-2.6.17/arch/um/os-Linux/process.c
5 ===================================================================
6 --- linux-2.6.17.orig/arch/um/os-Linux/process.c 2006-09-20 11:15:08.000000000 -0400
7 +++ linux-2.6.17/arch/um/os-Linux/process.c 2006-09-20 13:35:24.000000000 -0400
8 @@ -140,11 +140,9 @@ void os_usr1_process(int pid)
9 * syscalls, and also breaks with clone(), which does not unshare the TLS.
12 -inline _syscall0(pid_t, getpid)
17 + return syscall(__NR_getpid);
21 Index: linux-2.6.17/arch/um/os-Linux/sys-i386/tls.c
22 ===================================================================
23 --- linux-2.6.17.orig/arch/um/os-Linux/sys-i386/tls.c 2006-06-18 13:49:35.000000000 -0400
24 +++ linux-2.6.17/arch/um/os-Linux/sys-i386/tls.c 2006-09-20 13:37:27.000000000 -0400
26 #include "sysdep/tls.h"
27 #include "user_util.h"
29 -static _syscall1(int, get_thread_area, user_desc_t *, u_info);
31 /* Checks whether host supports TLS, and sets *tls_min according to the value
33 * i386 host have it == 6; x86_64 host have it == 12, for i386 emulation. */
34 @@ -17,7 +15,7 @@ void check_host_supports_tls(int *suppor
36 info.entry_number = val[i];
38 - if (get_thread_area(&info) == 0) {
39 + if(syscall(__NR_get_thread_area, &info) == 0){
43 Index: linux-2.6.17/arch/um/os-Linux/tls.c
44 ===================================================================
45 --- linux-2.6.17.orig/arch/um/os-Linux/tls.c 2006-08-15 21:59:56.000000000 -0400
46 +++ linux-2.6.17/arch/um/os-Linux/tls.c 2006-09-20 13:37:14.000000000 -0400
47 @@ -48,14 +48,11 @@ int os_get_thread_area(user_desc_t *info
48 #ifdef UML_CONFIG_MODE_TT
49 #include "linux/unistd.h"
51 -static _syscall1(int, get_thread_area, user_desc_t *, u_info);
52 -static _syscall1(int, set_thread_area, user_desc_t *, u_info);
54 int do_set_thread_area_tt(user_desc_t *info)
58 - ret = set_thread_area(info);
59 + ret = syscall(__NR_set_thread_area, info);
63 @@ -66,7 +63,7 @@ int do_get_thread_area_tt(user_desc_t *i
67 - ret = get_thread_area(info);
68 + ret = syscall(__NR_get_thread_area, info);