mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-17 12:46:27 +00:00
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:
@@ -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) && \
|
||||
|
||||
Reference in New Issue
Block a user