]> granicus.if.org Git - strace/commitdiff
Handle broken PTRACE_EVENT_STOP values
authorMike Frysinger <vapier@gentoo.org>
Fri, 27 Feb 2015 04:31:37 +0000 (23:31 -0500)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 27 Feb 2015 04:43:11 +0000 (04:43 +0000)
For a few linux releases (3.1 through 3.3), this define in the exported
headers were broken.  Redefine if that's the case.

* ptrace.h [PTRACE_EVENT_STOP]: Redefine if PTRACE_EVENT_STOP is 7.

ptrace.h

index 1a5414dba1d48b12979fc490d1174fadc01576d2..065cbda1a8983a1fd5fbbe92ac8e9c08e68451f2 100644 (file)
--- a/ptrace.h
+++ b/ptrace.h
@@ -50,6 +50,12 @@ extern long ptrace(int, int, char *, long);
 #ifndef PTRACE_EVENT_SECCOMP
 # define PTRACE_EVENT_SECCOMP  7
 #endif
+#ifdef PTRACE_EVENT_STOP
+/* Linux 3.1 - 3.3 releases had a broken value.  It was fixed in 3.4.  */
+# if PTRACE_EVENT_STOP == 7
+#  undef PTRACE_EVENT_STOP
+# endif
+#endif
 #ifndef PTRACE_EVENT_STOP
 # define PTRACE_EVENT_STOP     128
 #endif