From: Mike Frysinger Date: Fri, 27 Feb 2015 04:31:37 +0000 (-0500) Subject: Handle broken PTRACE_EVENT_STOP values X-Git-Tag: v4.10~49 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d32e1b9dde3fdbd723a672549d752665f7e72329;p=strace Handle broken PTRACE_EVENT_STOP values 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. --- diff --git a/ptrace.h b/ptrace.h index 1a5414db..065cbda1 100644 --- 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