From 70193c4950b998a841c27a2245522f7fe696e968 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 7 Apr 2020 14:21:52 -0600 Subject: compat: support latest suse 15.1 and 15.2 Contributed-by: Martin Hauke Signed-off-by: Jason A. Donenfeld --- src/compat/compat.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/compat/compat.h b/src/compat/compat.h index e834081..501aca5 100644 --- a/src/compat/compat.h +++ b/src/compat/compat.h @@ -37,6 +37,9 @@ #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) #define ISOPENSUSE15 #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0) && LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 0) +#define ISOPENSUSE152 +#endif #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0) @@ -669,7 +672,7 @@ struct __compat_dummy_container { char dev; }; #define COMPAT_CANNOT_USE_AVX512 #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0) && !defined(ISOPENSUSE15) #include #define genl_dump_check_consistent(a, b) genl_dump_check_consistent(a, b, &genl_family) #endif @@ -731,7 +734,7 @@ static inline void cpu_to_le32_array(u32 *buf, unsigned int words) } #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) && !defined(ISOPENSUSE15) #include static inline void crypto_xor_cpy(u8 *dst, const u8 *src1, const u8 *src2, unsigned int size) @@ -833,7 +836,7 @@ static __always_inline void old_rcu_barrier(void) #define COMPAT_CANNOT_DEPRECIATE_BH_RCU #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 10) && !defined(ISRHEL8) +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 10) && !defined(ISRHEL8) && !defined(ISOPENSUSE15) static inline void skb_mark_not_on_list(struct sk_buff *skb) { skb->next = NULL; @@ -859,7 +862,7 @@ static inline void skb_mark_not_on_list(struct sk_buff *skb) #endif #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 5, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 5, 0) && !defined(ISOPENSUSE152) #define genl_dumpit_info(cb) ({ \ struct { struct nlattr **attrs; } *a = (void *)((u8 *)cb->args + offsetofend(struct dump_ctx, next_allowedip)); \ BUILD_BUG_ON(sizeof(cb->args) < offsetofend(struct dump_ctx, next_allowedip) + sizeof(*a)); \ -- cgit v1.2.3-59-g8ed1b