[compiler-rt] r173933 - asan/tsan: manually define FUTEX constants, because <linux/futes.h> header is broken on some linux distributions

Dmitry Vyukov dvyukov at google.com
Wed Jan 30 06:39:27 PST 2013


Author: dvyukov
Date: Wed Jan 30 08:39:27 2013
New Revision: 173933

URL: http://llvm.org/viewvc/llvm-project?rev=173933&view=rev
Log:
asan/tsan: manually define FUTEX constants, because <linux/futes.h> header is broken on some linux distributions

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

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc?rev=173933&r1=173932&r2=173933&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc Wed Jan 30 08:39:27 2013
@@ -30,11 +30,14 @@
 #include <sys/syscall.h>
 #include <sys/time.h>
 #include <sys/types.h>
+#include <sys/prctl.h>
 #include <unistd.h>
 #include <unwind.h>
 #include <errno.h>
-#include <sys/prctl.h>
-#include <linux/futex.h>
+
+// <linux/futex.h> is broken on some linux distributions.
+const int FUTEX_WAIT = 0;
+const int FUTEX_WAKE = 1;
 
 // Are we using 32-bit or 64-bit syscalls?
 // x32 (which defines __x86_64__) has SANITIZER_WORDSIZE == 32





More information about the llvm-commits mailing list