qla2x00t-32gbit: Backport to older kernel versions

Unbreak the build for the previous commit against kernel versions
before v5.16.

See also commit 3080ea5553cc ("stddef: Introduce DECLARE_FLEX_ARRAY()
helper") # v5.16.
This commit is contained in:
Gleb Chesnokov
2023-07-19 11:35:51 +03:00
parent cba2284cd1
commit d74330aed2
+8
View File
@@ -1314,6 +1314,14 @@ static inline void __user *KERNEL_SOCKPTR(void *p)
#define sizeof_field(TYPE, MEMBER) sizeof((((TYPE *)0)->MEMBER))
#endif
#ifndef DECLARE_FLEX_ARRAY
#define DECLARE_FLEX_ARRAY(TYPE, NAME) \
struct { \
struct { } __empty_ ## NAME; \
TYPE NAME[]; \
}
#endif
/* <linux/string.h> */
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0) && \