repo.or.cz
/
musl.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
powerpc-sf longjmp clobbering of val argument
[musl.git]
/
src
/
misc
/
getauxval.c
blob
57f21eed9ef8d566d56072cb3fde8eaf4abb82bf
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
);