]> granicus.if.org Git - strace/blobdiff - ptrace.h
netlink_sock_diag: print inet_diag_sockid.idiag_if as an interface index
[strace] / ptrace.h
index 0f3b022061f91aaf0b64c6e75cd7d497cd7bb5d0..ce4fd9af3eac39c1bc6b43ba3e17ef00ffc447c6 100644 (file)
--- a/ptrace.h
+++ b/ptrace.h
 #ifndef STRACE_PTRACE_H
 #define STRACE_PTRACE_H
 
-#ifdef NEED_PTRACE_PROTOTYPE_WORKAROUND
-# define ptrace xptrace
-# include <sys/ptrace.h>
-# undef ptrace
-extern long ptrace(int, int, char *, long);
-#else
-# include <sys/ptrace.h>
-#endif
+#include <sys/ptrace.h>
 
 #ifdef HAVE_STRUCT_IA64_FPREG
 # define ia64_fpreg XXX_ia64_fpreg
@@ -67,6 +60,16 @@ extern long ptrace(int, int, char *, long);
 # undef ptrace_peeksiginfo_args
 #endif
 
+#if defined(SPARC) || defined(SPARC64)
+/*
+ * SPARC has a different PTRACE_DETACH value correctly defined in sys/ptrace.h,
+ * but linux/ptrace.h clobbers it with the standard one.  PTRACE_SUNDETACH is
+ * also defined to the correct value by sys/ptrace.h, so use that instead.
+ */
+# undef PTRACE_DETACH
+# define PTRACE_DETACH PTRACE_SUNDETACH
+#endif
+
 #ifndef PTRACE_EVENT_FORK
 # define PTRACE_EVENT_FORK     1
 #endif