]> granicus.if.org Git - strace/commitdiff
system.c was using __NR_* style syscall number defines, which don't
authorNate Sammons <nate@users.sourceforge.net>
Sat, 3 Jul 1999 18:53:05 +0000 (18:53 +0000)
committerNate Sammons <nate@users.sourceforge.net>
Sat, 3 Jul 1999 18:53:05 +0000 (18:53 +0000)
get defined now.  Use SYS_* instead, and also make the previously dead
include hack work.

sys_personality didn't work right before.

system.c

index e386ba5572f529d586b7e2691fc29504a2948f00..b5dca53c6c8f47a39576b80f1e0bf815741a4e45 100644 (file)
--- a/system.c
+++ b/system.c
 #include <netinet/in.h>
 #include <arpa/inet.h>
 
-#ifdef __NR_personality
+#include <sys/syscall.h>
+
+#ifdef SYS_personality
 /* Workaround for kernel namespace pollution. */
 #define _LINUX_PTRACE_H
+/* Yuck yuck yuck.  We can't include linux/ptrace.h, but personality.h
+   makes a declaration with struct pt_regs, which is defined there. */
+struct pt_regs;
 #define sys_personality kernel_sys_personality
 #include <linux/personality.h>
 #undef sys_personality
-#endif /* __NR_personality */
+#endif /* SYS_personality */
 
-#ifdef __NR_capget
+#ifdef SYS_capget
 #include <linux/capability.h>
 #endif
 
-#ifdef __NR_cacheflush
+#ifdef SYS_cacheflush
 #include <asm/cachectl.h>
 #endif
 
@@ -1201,7 +1206,7 @@ struct tcb *tcp;
 
 #endif /* SVR4 */
 
-#ifdef __NR_capget
+#ifdef SYS_capget
 int
 sys_capget(tcp)
 struct tcb *tcp;