asan/tsan: manually define FUTEX constants, because <linux/futes.h> header is broken...
authorDmitry Vyukov <dvyukov@google.com>
Wed, 30 Jan 2013 14:39:27 +0000 (14:39 +0000)
committerDmitry Vyukov <dvyukov@google.com>
Wed, 30 Jan 2013 14:39:27 +0000 (14:39 +0000)
llvm-svn: 173933

compiler-rt/lib/sanitizer_common/sanitizer_linux.cc

index 8b9ba38..ec6d837 100644 (file)
 #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