lkml.org 
[lkml]   [2021]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 04/20] linux/stddef.h, linux/NULL.h: Split NULL into a separate header
Date
Include <linux/NULL.h> from <linux/stddef.h> for compatibility.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
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
\
 
 \ /
  Last update: 2021-11-20 14:03    [W:0.427 / U:0.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site