| #ifndef _LINUX_STDDEF_H | |
| #define _LINUX_STDDEF_H | |
| #undef NULL | |
| #define NULL ((void *)0) | |
| #undef offsetof | |
| #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) | |
| /** | |
| * __DECLARE_FLEX_ARRAY() - Declare a flexible array usable in a union | |
| * | |
| * @TYPE: The type of each flexible array element | |
| * @NAME: The name of the flexible array member | |
| * | |
| * In order to have a flexible array member in a union or alone in a | |
| * struct, it needs to be wrapped in an anonymous struct with at least 1 | |
| * named member, but that member can be empty. | |
| */ | |
| #define __DECLARE_FLEX_ARRAY(TYPE, NAME) \ | |
| struct { \ | |
| struct { } __empty_ ## NAME; \ | |
| TYPE NAME[]; \ | |
| } | |
| #endif |