fix the old strace version on arm
[openwrt/svn-archive/archive.git] / utils / strace / patches-4.5.16 / 001-arm_eabi_syscalls.patch
1 Index: strace-4.5.16/linux/syscallent.h
2 ===================================================================
3 --- strace-4.5.16.orig/linux/syscallent.h 2007-08-02 03:37:55.000000000 +0200
4 +++ strace-4.5.16/linux/syscallent.h 2008-05-11 15:35:45.000000000 +0200
5 @@ -130,7 +130,10 @@
6 { 2, TF, sys_statfs, "statfs" }, /* 99 */
7 { 2, TD, sys_fstatfs, "fstatfs" }, /* 100 */
8 { 3, 0, sys_ioperm, "ioperm" }, /* 101 */
9 - { 2, TD, sys_socketcall, "socketcall", SYS_socketcall }, /* 102 */
10 + { 2, TD, sys_socketcall, "socketcall",
11 +#ifdef __NR_socketcall
12 + SYS_socketcall }, /* 102 */
13 +#endif
14 { 3, 0, sys_syslog, "syslog" }, /* 103 */
15 { 3, 0, sys_setitimer, "setitimer" }, /* 104 */
16 { 2, 0, sys_getitimer, "getitimer" }, /* 105 */
17 @@ -145,7 +148,10 @@
18 { 4, TP, sys_wait4, "wait4", SYS_wait4 }, /* 114 */
19 { 1, 0, sys_swapoff, "swapoff" }, /* 115 */
20 { 1, 0, sys_sysinfo, "sysinfo" }, /* 116 */
21 - { 6, 0, sys_ipc, "ipc", SYS_ipc }, /* 117 */
22 + { 6, 0, sys_ipc, "ipc",
23 +#ifdef __NR_ipc
24 + SYS_ipc }, /* 117 */
25 +#endif
26 { 1, TD, sys_fsync, "fsync" }, /* 118 */
27 { 1, TS, sys_sigreturn, "sigreturn" }, /* 119 */
28 { 5, TP, sys_clone, "clone", SYS_clone }, /* 120 */
29 @@ -282,7 +288,11 @@
30 { 3, 0, sys_io_cancel, "io_cancel" }, /* 249 */
31 { 5, 0, sys_fadvise64, "fadvise64" }, /* 250 */
32 { 5, 0, printargs, "SYS_251" }, /* 251 */
33 - { 1, TP, sys_exit, "exit_group", __NR_exit_group }, /* 252 */
34 + { 1, TP, sys_exit, "exit_group"
35 +#ifdef __NR_exit_group
36 + , __NR_exit_group
37 +#endif
38 + }, /* 252 */
39 { 4, 0, printargs, "lookup_dcookie"}, /* 253 */
40 { 1, 0, sys_epoll_create, "epoll_create" }, /* 254 */
41 { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 255 */
42 Index: strace-4.5.16/syscall.c
43 ===================================================================
44 --- strace-4.5.16.orig/syscall.c 2006-12-21 23:13:33.000000000 +0100
45 +++ strace-4.5.16/syscall.c 2008-05-11 15:35:45.000000000 +0200
46 @@ -2383,14 +2383,18 @@
47 switch (known_scno(tcp)) {
48 #ifdef LINUX
49 #if !defined (ALPHA) && !defined(SPARC) && !defined(SPARC64) && !defined(MIPS) && !defined(HPPA)
50 +#ifdef __NR_socketcall
51 case SYS_socketcall:
52 decode_subcall(tcp, SYS_socket_subcall,
53 SYS_socket_nsubcalls, deref_style);
54 break;
55 +#endif
56 +#ifdef __NR_ipc
57 case SYS_ipc:
58 decode_subcall(tcp, SYS_ipc_subcall,
59 SYS_ipc_nsubcalls, shift_style);
60 break;
61 +#endif
62 #endif /* !ALPHA && !MIPS && !SPARC && !SPARC64 && !HPPA */
63 #if defined (SPARC) || defined (SPARC64)
64 case SYS_socketcall: