Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Commit

Permalink
Handle broken PTRACE_EVENT_STOP values
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
vapier authored and ldv-alt committed Feb 27, 2015
1 parent 11cb0da commit d32e1b9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d32e1b9

Please sign in to comment.