/* SPDX-License-Identifier: LGPL-2.1 OR MIT */1/*2* Minimal errno definitions for NOLIBC3* Copyright (C) 2017-2022 Willy Tarreau <[email protected]>4*/56/* make sure to include all global symbols */7#include "nolibc.h"89#ifndef _NOLIBC_ERRNO_H10#define _NOLIBC_ERRNO_H1112#include <linux/errno.h>1314#ifndef NOLIBC_IGNORE_ERRNO15#define SET_ERRNO(v) do { errno = (v); } while (0)16int errno __attribute__((weak));17#else18#define SET_ERRNO(v) do { } while (0)19#endif202122/* errno codes all ensure that they will not conflict with a valid pointer23* because they all correspond to the highest addressable memory page.24*/25#define MAX_ERRNO 40952627#endif /* _NOLIBC_ERRNO_H */282930