From 729c1cfd39e859d6f5a24e1010959a382474592c Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Thu, 6 Nov 2014 10:49:16 -0800 Subject: 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 --- runtime/base/mutex-inl.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'runtime/base/mutex-inl.h') diff --git a/runtime/base/mutex-inl.h b/runtime/base/mutex-inl.h index e066787bfd..0b13e312d3 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); } -- cgit v1.2.3-59-g8ed1b