about summary refs log tree commit diff
path: root/include/stdlib.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/stdlib.h')
-rw-r--r--include/stdlib.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/stdlib.h b/include/stdlib.h
index 2bd5f102..1e67b896 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -7,7 +7,11 @@ extern "C" {
 
 #include <features.h>
 
+#ifdef __cplusplus
 #define NULL 0L
+#else
+#define NULL ((void*)0)
+#endif
 
 #define __NEED_size_t
 #define __NEED_wchar_t