[PATCH v2 04/20] linux/stddef.h, linux/NULL.h: Split NULL into a separate header

From: Alejandro Colomar
Date: Sat Nov 20 2021 - 08:01:35 EST


Include <linux/NULL.h> from <linux/stddef.h> for compatibility.

Signed-off-by: Alejandro Colomar <alx.manpages@xxxxxxxxx>
---
include/linux/NULL.h | 10 ++++++++++
include/linux/stddef.h | 4 +---
2 files changed, 11 insertions(+), 3 deletions(-)
create mode 100644 include/linux/NULL.h

diff --git a/include/linux/NULL.h b/include/linux/NULL.h
new file mode 100644
index 000000000000..f09d8baecc80
--- /dev/null
+++ b/include/linux/NULL.h
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _LINUX_NULL_H
+#define _LINUX_NULL_H
+
+
+#undef NULL
+#define NULL ((void *)0)
+
+
+#endif /* _LINUX_NULL_H */
diff --git a/include/linux/stddef.h b/include/linux/stddef.h
index c2e7e5051ef3..3f7ddcd5e0aa 100644
--- a/include/linux/stddef.h
+++ b/include/linux/stddef.h
@@ -5,14 +5,12 @@

#include <uapi/linux/stddef.h>

+#include <linux/NULL.h>
#include <linux/offsetof.h>
#include <linux/offsetofend.h>
#include <linux/sizeof_field.h>


-#undef NULL
-#define NULL ((void *)0)
-
enum {
false = 0,
true = 1
--
2.33.1