summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/include/stddef.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libc/include/stddef.h b/lib/libc/include/stddef.h
index ba469c1..7f7eb43 100644
--- a/lib/libc/include/stddef.h
+++ b/lib/libc/include/stddef.h
@@ -30,6 +30,12 @@
#ifndef _STDDEF_H
#define _STDDEF_H
+#if __cplusplus >= 201103L
+#define NULL nullptr
+#elif defined(__cplusplus)
+#define NULL 0L
+#else
#define NULL ((void *) 0)
+#endif
#endif /* !_STDDEF_H */