Use of undeclared identifier PTRACE_ATTACH

I'm trying to trace another process, but I get the error mentioned in the title. I'm running Mac OS X v 10.10 and building for the same OS. Here's my code:

1
2
3
4
5
6
7
8
9
#include <sys/ptrace.h>
#include <sstream>
using namespace std;
pid_t pgrep(string username, string processName);
int main(int argc, const char * argv[]) {
    pid_t pid = pgrep("montana","Chrome");
    int stuff = ptrace(PTRACE_ATTACH, pid, NULL, NULL);
    
}
Topic archived. No new replies allowed.