/* SPDX-License-Identifier: LGPL-2.1 OR MIT */1/*2* auxv definitions for NOLIBC3* Copyright (C) 2017-2021 Willy Tarreau <[email protected]>4*/56/* make sure to include all global symbols */7#include "../nolibc.h"89#ifndef _NOLIBC_SYS_AUXV_H10#define _NOLIBC_SYS_AUXV_H1112#ifndef NOLIBC_NO_RUNTIME1314#include "../crt.h"1516static __attribute__((unused))17unsigned long getauxval(unsigned long type)18{19const unsigned long *auxv = _auxv;20unsigned long ret;2122if (!auxv)23return 0;2425while (1) {26if (!auxv[0] && !auxv[1]) {27ret = 0;28break;29}3031if (auxv[0] == type) {32ret = auxv[1];33break;34}3536auxv += 2;37}3839return ret;40}4142#endif /* NOLIBC_NO_RUNTIME */43#endif /* _NOLIBC_SYS_AUXV_H */444546