add namespace-safe version of getauxval for internal use
authorRich Felker <dalias@aerifal.cx>
Mon, 10 Dec 2018 03:40:52 +0000 (22:40 -0500)
committerRich Felker <dalias@aerifal.cx>
Mon, 10 Dec 2018 03:40:52 +0000 (22:40 -0500)
src/include/sys/auxv.h [new file with mode: 0644]
src/misc/getauxval.c

diff --git a/src/include/sys/auxv.h b/src/include/sys/auxv.h
new file mode 100644 (file)
index 0000000..9358a4a
--- /dev/null
@@ -0,0 +1,10 @@
+#ifndef SYS_AUXV_H
+#define SYS_AUXV_H
+
+#include "../../../include/sys/auxv.h"
+
+#include <features.h>
+
+hidden unsigned long __getauxval(unsigned long);
+
+#endif
index b846c80fdd4c0567cc3223398b57fdedd0f0b0a2..57f21eed9ef8d566d56072cb3fde8eaf4abb82bf 100644 (file)
@@ -2,7 +2,7 @@
 #include <errno.h>
 #include "libc.h"
 
-unsigned long getauxval(unsigned long item)
+unsigned long __getauxval(unsigned long item)
 {
        size_t *auxv = libc.auxv;
        if (item == AT_SECURE) return libc.secure;
@@ -11,3 +11,5 @@ unsigned long getauxval(unsigned long item)
        errno = ENOENT;
        return 0;
 }
+
+weak_alias(__getauxval, getauxval);