summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorlordrasmus <lordrasmus@gmail.com>2023-05-29 20:34:10 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2023-08-14 10:18:17 +0200
commit567e766d6c2af450837bb86befc14067bcc5da75 (patch)
treee72c0677217b46f3393fa20c7c04c5851c667981 /libc
parent8d09605656ccd90fc71d4ba8e06760b2b276db01 (diff)
fix getauxval() on aarch64 gcc 11
Diffstat (limited to 'libc')
-rwxr-xr-xlibc/misc/auxvt/getauxval.c12
1 files changed, 10 insertions, 2 deletions
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 );
+}