summaryrefslogtreecommitdiffstats
path: root/src/include/stddef.h
diff options
context:
space:
mode:
authorWe-unite <3205135446@qq.com>2025-01-23 10:41:10 +0800
committerWe-unite <3205135446@qq.com>2025-01-23 10:41:10 +0800
commite6f77b7ea3e38c9853bee60b275f3f89d252a5b3 (patch)
tree80bfbabed9d4cbcf9fa62677f78b34279d7e2f87 /src/include/stddef.h
downloadlinux-0.11-master.tar.gz
linux-0.11-master.zip
Initial commit, makee it usable on newest linuxHEADmaster
Diffstat (limited to 'src/include/stddef.h')
-rw-r--r--src/include/stddef.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/include/stddef.h b/src/include/stddef.h
new file mode 100644
index 0000000..97f72ff
--- /dev/null
+++ b/src/include/stddef.h
@@ -0,0 +1,19 @@
1#ifndef _STDDEF_H
2#define _STDDEF_H
3
4#ifndef _PTRDIFF_T
5#define _PTRDIFF_T
6typedef long ptrdiff_t;
7#endif
8
9#ifndef _SIZE_T
10#define _SIZE_T
11typedef unsigned long size_t;
12#endif
13
14#undef NULL
15#define NULL ((void *)0)
16
17#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
18
19#endif