[compiler-rt] r185317 - [sanitizer] Fix build with older kernels.

Evgeniy Stepanov eugeni.stepanov at gmail.com
Mon Jul 1 02:10:34 PDT 2013


Author: eugenis
Date: Mon Jul  1 04:10:34 2013
New Revision: 185317

URL: http://llvm.org/viewvc/llvm-project?rev=185317&view=rev
Log:
[sanitizer] Fix build with older kernels.

PTRACE_SETREGSET & PTRACE_GETREGSET may be missing from linux headers.

Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc?rev=185317&r1=185316&r2=185317&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc Mon Jul  1 04:10:34 2013
@@ -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





More information about the llvm-commits mailing list