[sanitizer] Fix build with older kernels.

PTRACE_SETREGSET & PTRACE_GETREGSET may be missing from linux headers.

llvm-svn: 185317
This commit is contained in:
Evgeniy Stepanov 2013-07-01 09:10:34 +00:00
parent ff9a65c6a6
commit d6e856f722
1 changed files with 5 additions and 0 deletions

View File

@ -179,8 +179,13 @@ namespace __sanitizer {
int ptrace_setfpxregs = PTRACE_SETFPXREGS;
int ptrace_getsiginfo = PTRACE_GETSIGINFO;
int ptrace_setsiginfo = PTRACE_SETSIGINFO;
#if defined(PTRACE_GETREGSET) && defined(PTRACE_SETREGSET)
int ptrace_getregset = PTRACE_GETREGSET;
int ptrace_setregset = PTRACE_SETREGSET;
#else
int ptrace_getregset = -1;
int ptrace_setregset = -1;
#endif
#endif
// ioctl arguments