From: Rich Felker Date: Mon, 10 Dec 2018 03:40:52 +0000 (-0500) Subject: add namespace-safe version of getauxval for internal use X-Git-Tag: v1.1.21~13 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=26c66c485c04fa782b8c6f7450bf008f4457b5a8;p=oweals%2Fmusl.git add namespace-safe version of getauxval for internal use --- 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 + +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 #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);