/* 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#include "../crt.h"1314static __attribute__((unused))15unsigned long getauxval(unsigned long type)16{17const unsigned long *auxv = _auxv;18unsigned long ret;1920if (!auxv)21return 0;2223while (1) {24if (!auxv[0] && !auxv[1]) {25ret = 0;26break;27}2829if (auxv[0] == type) {30ret = auxv[1];31break;32}3334auxv += 2;35}3637return ret;38}3940#endif /* _NOLIBC_SYS_AUXV_H */414243