copied from http://www.nabble.com/-PATCH--Define-RTLD_SINGLE_THREAD_P-on-ARM-tf3814888.html --- glibc-2.6/glibc-ports-2.6.1/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h 2007-07-03 11:03:16.000000000 +0200 +++ glibc-2.6/ports/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h 2007-07-03 11:04:30.000000000 +0200 @@ -126,3 +126,9 @@ # define NO_CANCELLATION 1 #endif + +#ifndef __ASSEMBLER__ +# define RTLD_SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + header.multiple_threads) == 0, 1) +#endif