summaryrefslogtreecommitdiff
path: root/include/stddef.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/stddef.h')
-rw-r--r--include/stddef.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/stddef.h b/include/stddef.h
new file mode 100644
index 00000000..dbf5a4ae
--- /dev/null
+++ b/include/stddef.h
@@ -0,0 +1,19 @@
+#ifndef _STDDEF_H
+#define _STDDEF_H
+
+#undef NULL
+#ifdef __cplusplus
+#define NULL 0
+#else
+#define NULL ((void*)0)
+#endif
+
+#define __NEED_ptrdiff_t
+#define __NEED_size_t
+#define __NEED_wchar_t
+
+#include <bits/alltypes.h>
+
+#define offsetof(type, member) ((size_t)( (char *)&(((type *)0)->member) - (char *)0 ))
+
+#endif