aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/sys/_null.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/sys/_null.h b/sys/sys/_null.h
index 9e965f100b1a..caae78133c9d 100644
--- a/sys/sys/_null.h
+++ b/sys/sys/_null.h
@@ -31,11 +31,15 @@
#if defined(_KERNEL) || !defined(__cplusplus)
#define NULL ((void *)0)
#else
+#if defined(__GNUG__) && defined(__GNUC__) && __GNUC__ >= 4
+#define NULL __null
+#else
#if defined(__LP64__)
#define NULL (0L)
#else
#define NULL 0
#endif /* __LP64__ */
+#endif /* __GNUG__ */
#endif /* _KERNEL || !__cplusplus */
#endif