mirror of
https://github.com/torvalds/linux.git
synced 2026-12-03 20:06:35 +00:00
This is the location regular userspace expects these definitions. Signed-off-by: Thomas Weißschuh <[email protected]> Acked-by: Willy Tarreau <[email protected]> Link: https://lore.kernel.org/r/[email protected]
25 lines
476 B
C
25 lines
476 B
C
/* SPDX-License-Identifier: LGPL-2.1 OR MIT */
|
|
/*
|
|
* Stddef definitions for NOLIBC
|
|
* Copyright (C) 2017-2021 Willy Tarreau <[email protected]>
|
|
*/
|
|
|
|
/* make sure to include all global symbols */
|
|
#include "nolibc.h"
|
|
|
|
#ifndef _NOLIBC_STDDEF_H
|
|
#define _NOLIBC_STDDEF_H
|
|
|
|
#include "stdint.h"
|
|
|
|
/* note: may already be defined */
|
|
#ifndef NULL
|
|
#define NULL ((void *)0)
|
|
#endif
|
|
|
|
#ifndef offsetof
|
|
#define offsetof(TYPE, FIELD) ((size_t) &((TYPE *)0)->FIELD)
|
|
#endif
|
|
|
|
#endif /* _NOLIBC_STDDEF_H */
|