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