From 567e766d6c2af450837bb86befc14067bcc5da75 Mon Sep 17 00:00:00 2001 From: lordrasmus Date: Mon, 29 May 2023 20:34:10 +0200 Subject: fix getauxval() on aarch64 gcc 11 --- libc/misc/auxvt/getauxval.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'libc/misc') diff --git a/libc/misc/auxvt/getauxval.c b/libc/misc/auxvt/getauxval.c index b4e621301..2bdffaf2c 100755 --- a/libc/misc/auxvt/getauxval.c +++ b/libc/misc/auxvt/getauxval.c @@ -22,13 +22,18 @@ #include "sys/auxv.h" -unsigned long int getauxval (unsigned long int __type) +/* + * + * aarch64 gcc 11 uses __getauxval() in init_have_lse_atomics() + * + */ +unsigned long int __getauxval (unsigned long int __type) { if ( __type >= AUX_MAX_AT_ID ){ __set_errno (ENOENT); return 0; } - + if ( _dl_auxvt[__type].a_type == __type){ return _dl_auxvt[__type].a_un.a_val; } @@ -37,4 +42,7 @@ unsigned long int getauxval (unsigned long int __type) return 0; } +unsigned long int getauxval (unsigned long int __type){ + return __getauxval( __type ); +} -- cgit v1.2.3