[PATCH] ARM EABI build fix
Johannes Stezenbach
js at sig21.net
Fri Aug 8 15:08:18 UTC 2008
Hi,
include/asm-arm/unistd.h from the Linux kernel has the following
at the bottom:
/*
* The following syscalls are obsolete and no longer available for EABI.
*/
#if defined(__ARM_EABI__) && !defined(__KERNEL__)
#undef __NR_time
#undef __NR_umount
#undef __NR_stime
#undef __NR_alarm
#undef __NR_utime
#undef __NR_getrlimit
#undef __NR_select
#undef __NR_readdir
#undef __NR_mmap
#undef __NR_socketcall
#undef __NR_syscall
#undef __NR_ipc
#endif
This causes the following build error when strace is compiled
with an ARM EABI toolchain:
syscall.c: In function ‘trace_syscall’:
syscall.c:2435: error: ‘__NR_socketcall’ undeclared (first use in this function)
syscall.c:2435: error: (Each undeclared identifier is reported only once
syscall.c:2435: error: for each function it appears in.)
syscall.c:2439: error: ‘__NR_ipc’ undeclared (first use in this function)
Patch below fixes it for me.
Johannes
--- strace-4.5.17-cvs20080808/syscall.c.orig 2008-08-08 16:37:27.000000000 +0200
+++ strace-4.5.17-cvs20080808/syscall.c 2008-08-08 16:54:22.000000000 +0200
@@ -2431,7 +2431,7 @@ trace_syscall(struct tcb *tcp)
switch (known_scno(tcp)) {
#ifdef LINUX
-#if !defined (ALPHA) && !defined(MIPS) && !defined(HPPA)
+#if !defined (ALPHA) && !defined(MIPS) && !defined(HPPA) && !defined(__ARM_EABI__)
case SYS_socketcall:
decode_subcall(tcp, SYS_socket_subcall,
SYS_socket_nsubcalls, deref_style);
More information about the Strace-devel
mailing list