File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 103103#define BUILD_ASSERT (x )
104104#endif
105105
106+ #ifndef __DECLARE_FLEX_ARRAY
107+ /*
108+ * Copied from linux.git/include/uapi/stddef.h
109+ *
110+ * __DECLARE_FLEX_ARRAY() - Declare a flexible array usable in a union
111+ *
112+ * @TYPE: The type of each flexible array element
113+ * @NAME: The name of the flexible array member
114+ *
115+ * In order to have a flexible array member in a union or alone in a struct, it
116+ * needs to be wrapped in an anonymous struct with at least 1 named member, but
117+ * that member can be empty.
118+ */
119+ #define __DECLARE_FLEX_ARRAY (TYPE , NAME ) \
120+ struct { \
121+ struct { } __empty_ ## NAME; \
122+ TYPE NAME[]; \
123+ }
124+ #endif
125+
106126static inline void print_trace (void )
107127{
108128#ifndef BTRFS_DISABLE_BACKTRACE
You can’t perform that action at this time.
0 commit comments