aboutsummaryrefslogtreecommitdiff
path: root/linux/include/stddef.h
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2021-08-15 00:16:45 -0400
committerAndrew Lee <alee14498@protonmail.com>2021-08-15 00:16:45 -0400
commit723428bebe3105ad3c3406e416402d1831b482c4 (patch)
treeff990e306163515973746ddfb261f29ba8765441 /linux/include/stddef.h
downloadlinux-0.01-distro-723428bebe3105ad3c3406e416402d1831b482c4.tar.gz
linux-0.01-distro-723428bebe3105ad3c3406e416402d1831b482c4.tar.bz2
linux-0.01-distro-723428bebe3105ad3c3406e416402d1831b482c4.zip
Inital commit
Diffstat (limited to 'linux/include/stddef.h')
-rw-r--r--linux/include/stddef.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/linux/include/stddef.h b/linux/include/stddef.h
new file mode 100644
index 0000000..97f72ff
--- /dev/null
+++ b/linux/include/stddef.h
@@ -0,0 +1,19 @@
+#ifndef _STDDEF_H
+#define _STDDEF_H
+
+#ifndef _PTRDIFF_T
+#define _PTRDIFF_T
+typedef long ptrdiff_t;
+#endif
+
+#ifndef _SIZE_T
+#define _SIZE_T
+typedef unsigned long size_t;
+#endif
+
+#undef NULL
+#define NULL ((void *)0)
+
+#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+
+#endif