[sanitizer] Fix build with older kernels.

PTRACE_SETREGSET & PTRACE_GETREGSET may be missing from linux headers.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185317 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
index 97ce979..6e83efd 100644
--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
@@ -179,8 +179,13 @@
   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