LinuxKPI: change DECLARE_FLEX_ARRAY()
DECLARE_FLEX_ARRAY can be used inside a structure. On FreeBSD due to -Wgnu-variable-sized-type-not-at-end this yields an error. Use [0] instead of [] to overcome this. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D34350
This commit is contained in:
parent
810ca5629a
commit
fab601c5b7
@ -700,7 +700,7 @@ hex2bin(uint8_t *bindst, const char *hexsrc, size_t binlen)
|
||||
}
|
||||
|
||||
#define DECLARE_FLEX_ARRAY(_t, _n) \
|
||||
struct { struct { } __dummy_ ## _n; _t _n[]; }
|
||||
struct { struct { } __dummy_ ## _n; _t _n[0]; }
|
||||
|
||||
/*
|
||||
* Checking if an option is defined would be easy if we could do CPP inside CPP.
|
||||
|
Loading…
x
Reference in New Issue
Block a user