Move include of system headers outside namesapce.
This happened to work with old system header files.
But with newer glibc 2.15 header files, typedef names
such as __u32 and __u64 are included into a namespace
and could not be used in other system header files.
BUG: 18275923
Change-Id: I7c61270d08a7b1c69cee55a6a23b00372f0f51c8
diff --git a/runtime/base/mutex-inl.h b/runtime/base/mutex-inl.h
index e066787..0b13e31 100644
--- a/runtime/base/mutex-inl.h
+++ b/runtime/base/mutex-inl.h
@@ -26,16 +26,18 @@
#include "runtime.h"
#include "thread.h"
-namespace art {
-
-#define CHECK_MUTEX_CALL(call, args) CHECK_PTHREAD_CALL(call, args, name_)
-
#if ART_USE_FUTEXES
#include "linux/futex.h"
#include "sys/syscall.h"
#ifndef SYS_futex
#define SYS_futex __NR_futex
#endif
+#define CHECK_MUTEX_CALL(call, args) CHECK_PTHREAD_CALL(call, args, name_)
+#endif // ART_USE_FUTEXES
+
+namespace art {
+
+#if ART_USE_FUTEXES
static inline int futex(volatile int *uaddr, int op, int val, const struct timespec *timeout, volatile int *uaddr2, int val3) {
return syscall(SYS_futex, uaddr, op, val, timeout, uaddr2, val3);
}