about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2018-12-09 22:40:52 -0500
committerRich Felker <dalias@aerifal.cx>2018-12-09 22:40:52 -0500
commit26c66c485c04fa782b8c6f7450bf008f4457b5a8 (patch)
tree08b85000bdcb5ddce13ca4cd8ec75f76b4059369
parent1de4788610ab55d26937daa645d8fc25f5f43e39 (diff)
downloadmusl-26c66c485c04fa782b8c6f7450bf008f4457b5a8.tar.gz
musl-26c66c485c04fa782b8c6f7450bf008f4457b5a8.tar.xz
musl-26c66c485c04fa782b8c6f7450bf008f4457b5a8.zip
add namespace-safe version of getauxval for internal use
-rw-r--r--src/include/sys/auxv.h10
-rw-r--r--src/misc/getauxval.c4
2 files changed, 13 insertions, 1 deletions
diff --git a/src/include/sys/auxv.h b/src/include/sys/auxv.h
new file mode 100644
index 00000000..9358a4a5
--- /dev/null
+++ b/src/include/sys/auxv.h
@@ -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
diff --git a/src/misc/getauxval.c b/src/misc/getauxval.c
index b846c80f..57f21eed 100644
--- a/src/misc/getauxval.c
+++ b/src/misc/getauxval.c
@@ -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);