aboutsummaryrefslogtreecommitdiff
path: root/include/linux/stddef.h
diff options
context:
space:
mode:
authorMeizu OpenSource <patchwork@meizu.com>2016-08-15 10:19:42 +0800
committerMeizu OpenSource <patchwork@meizu.com>2016-08-15 10:19:42 +0800
commitd2e1446d81725c351dc73a03b397ce043fb18452 (patch)
tree4dbc616b7f92aea39cd697a9084205ddb805e344 /include/linux/stddef.h
first commit
Diffstat (limited to 'include/linux/stddef.h')
-rw-r--r--include/linux/stddef.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/linux/stddef.h b/include/linux/stddef.h
new file mode 100644
index 000000000..f4aec0e75
--- /dev/null
+++ b/include/linux/stddef.h
@@ -0,0 +1,21 @@
+#ifndef _LINUX_STDDEF_H
+#define _LINUX_STDDEF_H
+
+#include <uapi/linux/stddef.h>
+
+
+#undef NULL
+#define NULL ((void *)0)
+
+enum {
+ false = 0,
+ true = 1
+};
+
+#undef offsetof
+#ifdef __compiler_offsetof
+#define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER)
+#else
+#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+#endif
+#endif