Skip to content

Commit

Permalink
PT_SYSCALL is undefined on SPARC/SPARC64 (Closes #734312)
Browse files Browse the repository at this point in the history
While kFreeBSD uses this define, SPARC doesn't define it.
Thanks to Paul Gevers <[email protected]> for the patch.
  • Loading branch information
comotion committed Jan 6, 2014
1 parent 4bb17f3 commit 0497c49
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions security.c
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,11 @@ int initSecurity(int* max_mem_lock, int* memory_safe, int* ptrace_safe,
}
#endif

// kFreeBSD wants PT_*, while SPARC doesn't have these
#if !defined(PT_ATTACH)
#define PT_ATTACH PTRACE_ATTACH
#define PT_SYSCALL PTRACE_SYSCALL
#endif
if (ptrace(PT_ATTACH, p0, 0, 0) != 0) {
// someone is already attached to us; shoot the parent in the head
fprintf(stderr, "Can't attach to parent!\n");
Expand Down

0 comments on commit 0497c49

Please sign in to comment.