mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-30 22:03:17 +01:00
NULL works differently in C++ compared to C. To allow testing the UAPI headers against C++ compilers, provide a variant of NULL which works with those. Signed-off-by: Thomas Weißschuh <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Nicolas Schier <[email protected]>
14 lines
260 B
C
14 lines
260 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
#ifndef _DUMMY_STDDEF_H
|
|
#define _DUMMY_STDDEF_H
|
|
|
|
#define offsetof(TYPE, MEMBER) __builtin_offsetof(TYPE, MEMBER)
|
|
|
|
#ifdef __cplusplus
|
|
#define NULL 0
|
|
#else
|
|
#define NULL ((void *)0)
|
|
#endif
|
|
|
|
#endif /* _DUMMY_STDDEF_H */
|