From c0a09054b238982e7d40d7dd6fe571bbd9664fe3 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 30 Jan 2017 05:07:36 +0100 Subject: aarch64: fix syscall_error_handler, fixes tst-mqueue errors Signed-off-by: Waldemar Brodkorb --- libc/sysdeps/linux/aarch64/sysdep.h | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/libc/sysdeps/linux/aarch64/sysdep.h b/libc/sysdeps/linux/aarch64/sysdep.h index 177b0f15f..cc2ffcb65 100644 --- a/libc/sysdeps/linux/aarch64/sysdep.h +++ b/libc/sysdeps/linux/aarch64/sysdep.h @@ -112,19 +112,13 @@ END (name) # define ret_ERRVAL ret -#if defined _LIBC_REENTRANT -# if defined USE___THREAD -# define SYSCALL_ERROR_ERRNO errno -# endif -#endif - -#if defined USE___THREAD +#if defined NOT_IN_libc # define SYSCALL_ERROR .Lsyscall_error # define SYSCALL_ERROR_HANDLER \ .Lsyscall_error: \ - adrp x1, :gottprel:SYSCALL_ERROR_ERRNO; \ + adrp x1, :gottprel:errno; \ neg w2, w0; \ - ldr x1, [x1, :gottprel_lo12:SYSCALL_ERROR_ERRNO]; \ + ldr x1, [x1, :gottprel_lo12:errno]; \ mrs x3, tpidr_el0; \ mov x0, -1; \ str w2, [x1, x3]; \ -- cgit v1.2.3