summaryrefslogtreecommitdiffhomepage
path: root/src/internal/nolibc/stddef.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/internal/nolibc/stddef.h')
-rw-r--r--src/internal/nolibc/stddef.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/internal/nolibc/stddef.h b/src/internal/nolibc/stddef.h
new file mode 100644
index 0000000..8288bae
--- /dev/null
+++ b/src/internal/nolibc/stddef.h
@@ -0,0 +1,6 @@
+#ifndef _STDDEF_H
+#define _STDDEF_H
+
+#define offsetof(type, member) ((size_t)( (char *)&(((type *)0)->member) - (char *)0 ))
+
+#endif