aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/_null.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/sys/_null.h')
-rw-r--r--sys/sys/_null.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/sys/_null.h b/sys/sys/_null.h
index a0ba677abaac..72e7f85bf1a9 100644
--- a/sys/sys/_null.h
+++ b/sys/sys/_null.h
@@ -28,14 +28,14 @@
#ifndef NULL
-#ifdef _KERNEL
-#define NULL (void *)0
+#if defined(_KERNEL) || !defined(__cplusplus)
+#define NULL ((void *)0)
#else
#if defined(__LP64__)
-#define NULL 0L
+#define NULL (0L)
#else
#define NULL 0
-#endif
-#endif /* _KERNEL */
+#endif /* __LP64__ */
+#endif /* _KERNEL || !__cplusplus */
#endif