getauxval.c\misc\src - musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/misc/getauxval.c
blob: 57f21eed9ef8d566d56072cb3fde8eaf4abb82bf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <sys/auxv.h>
#include <errno.h>
#include "libc.h"
unsigned long __getauxval(unsigned long item)
{
	size_t *auxv = libc.auxv;
	if (item == AT_SECURE) return libc.secure;
	for (; *auxv; auxv+=2)
		if (*auxv==item) return auxv[1];
	errno = ENOENT;
	return 0;
}
weak_alias(__getauxval, getauxval);
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月10日 22:37:17 +0000

AltStyle によって変換されたページ (->オリジナル) /