![Weijie Gao](/assets/img/avatar_default.png)
Fix build failure with linux kernel 6.6 Related kernel commits: 20b0b53aca43 (genetlink: introduce split op representation) bffcc6882a1b (genetlink: remove userhdr from struct genl_info) e9a688bcb193 (random: use rejection sampling for uniform bounded random integers) 3c202d14a9d7 (prandom: remove prandom_u32_max()) 3d2f20ad46f8 (wifi: iwlwifi: Use generic thermal_zone_get_trip() function) Signed-off-by: Weijie Gao <hackpascal@gmail.com>
33 lines
933 B
Diff
33 lines
933 B
Diff
--- a/backport-include/net/genetlink.h
|
|
+++ b/backport-include/net/genetlink.h
|
|
@@ -3,6 +3,7 @@
|
|
#include_next <net/genetlink.h>
|
|
#include <linux/version.h>
|
|
|
|
+#if LINUX_VERSION_IS_LESS(4,12,0)
|
|
static inline void __bp_genl_info_userhdr_set(struct genl_info *info,
|
|
void *userhdr)
|
|
{
|
|
@@ -14,7 +15,6 @@ static inline void *__bp_genl_info_userh
|
|
return info->userhdr;
|
|
}
|
|
|
|
-#if LINUX_VERSION_IS_LESS(4,12,0)
|
|
#define GENL_SET_ERR_MSG(info, msg) NL_SET_ERR_MSG(genl_info_extack(info), msg)
|
|
|
|
static inline int genl_err_attr(struct genl_info *info, int err,
|
|
@@ -44,11 +44,13 @@ static inline struct netlink_ext_ack *ge
|
|
#endif
|
|
}
|
|
|
|
+#if LINUX_VERSION_IS_LESS(6,6,0)
|
|
/* this gets put in place of info->userhdr, since we use that above */
|
|
static inline void *genl_info_userhdr(struct genl_info *info)
|
|
{
|
|
return (u8 *)info->genlhdr + GENL_HDRLEN;
|
|
}
|
|
+#endif
|
|
|
|
#if LINUX_VERSION_IS_LESS(4,10,0)
|
|
#define __genl_ro_after_init
|