f39fa113e600e4718d92d34cc01d29e8d424b150
[openwrt/svn-archive/archive.git] / utils / strace / patches / 01-linux_sigcontext.patch
1 diff -urN strace-4.5.14/signal.c strace-4.5.14.new/signal.c
2 --- strace-4.5.14/signal.c 2006-01-12 23:34:50.000000000 +0100
3 +++ strace-4.5.14.new/signal.c 2006-11-14 18:25:18.000000000 +0100
4 @@ -66,7 +66,7 @@
5
6
7 #ifdef LINUX
8 -
9 +#include <linux/version.h>
10 #ifdef IA64
11 # include <asm/ptrace_offsets.h>
12 #endif /* !IA64 */
13 @@ -1420,7 +1420,11 @@
14 if (umove(tcp, sp, &sc) < 0)
15 return 0;
16 tcp->u_arg[0] = 1;
17 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
18 tcp->u_arg[1] = sc.sc_sigset;
19 +#else
20 + tcp->u_arg[1] = sc.sc_hi2;
21 +#endif
22 } else {
23 tcp->u_rval = tcp->u_error = 0;
24 if(tcp->u_arg[0] == 0)
25 diff -urN strace-4.5.14/system.c strace-4.5.14.new/system.c
26 --- strace-4.5.14/system.c 2006-01-12 22:21:06.000000000 +0100
27 +++ strace-4.5.14.new/system.c 2006-11-14 17:39:30.000000000 +0100
28 @@ -78,6 +78,7 @@
29 #endif
30
31 #include <linux/sysctl.h>
32 +#include <linux/version.h>
33
34 static const struct xlat mount_flags[] = {
35 { MS_MGC_VAL, "MS_MGC_VAL" },
36 @@ -1578,7 +1579,9 @@
37 { CTL_KERN, "CTL_KERN" },
38 { CTL_VM, "CTL_VM" },
39 { CTL_NET, "CTL_NET" },
40 - { CTL_PROC, "CTL_PROC" },
41 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
42 + { CTL_PROC, "CTL_PROC" },
43 +#endif
44 { CTL_FS, "CTL_FS" },
45 { CTL_DEBUG, "CTL_DEBUG" },
46 { CTL_DEV, "CTL_DEV" },