Browse Source

fix getauxval() on aarch64 gcc 11

lordrasmus 11 months ago
parent
commit
567e766d6c
1 changed files with 10 additions and 2 deletions
  1. 10 2
      libc/misc/auxvt/getauxval.c

+ 10 - 2
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 );
+}