stddef.h: Introduce nullptr constant

GCC-13 introduced the nullptr constant. Use it when compiling with the
C23 standard.

Change-Id: I07db866bebfd25f1a60d18a3228ada2957500234
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83459
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Elyes Haouas 2024-07-14 07:03:09 +02:00
commit 6042ba010a

View file

@ -19,7 +19,12 @@ typedef __SIZE_TYPE__ ssize_t;
typedef __WCHAR_TYPE__ wchar_t;
typedef __WINT_TYPE__ wint_t;
#if __STDC_VERSION__ >= 202300L
#define NULL nullptr
#else
#define nullptr ((void *)0)
#define NULL ((void *)0)
#endif
/* The devicetree data structures are only mutable in ramstage. All other
stages have a constant devicetree. */