Skip to content

Commit

Permalink
Fix fallback flex array
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Fougner <[email protected]>
  • Loading branch information
fougner committed Dec 7, 2023
1 parent 1c2cb80 commit abf0d90
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion include/linux/kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,11 @@ static inline void dump_stack(void) {}
#ifdef __DECLARE_FLEX_ARRAY
#define DECLARE_FLEX_ARRAY(TYPE, NAME) __DECLARE_FLEX_ARRAY(TYPE, NAME)
#else
#define __DECLARE_FLEX_ARRAY(T, member) T member[0]
#define DECLARE_FLEX_ARRAY(TYPE, NAME) \
struct { \
struct { } __empty_ ## NAME; \
TYPE NAME[]; \
}
#endif

#endif

0 comments on commit abf0d90

Please sign in to comment.