projects
/
musl
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
rework langinfo code for ABI compat and for use by time code
[musl]
/
misc
/
getauxval.c
1
#include <sys/auxv.h>
2
#include <errno.h>
3
#include "libc.h"
4
5
unsigned long __getauxval(unsigned long item)
6
{
7
size_t *auxv = libc.auxv;
8
if (item == AT_SECURE) return libc.secure;
9
for (; *auxv; auxv+=2)
10
if (*auxv==item) return auxv[1];
11
errno = ENOENT;
12
return 0;
13
}
14
15
weak_alias(__getauxval, getauxval);