From eaffd2bed6ef52d54450434c400a5ee7d566ea3c Mon Sep 17 00:00:00 2001 From: Yaroslav Gurov Date: Thu, 16 Oct 2025 19:43:05 -0400 Subject: [PATCH] fix: compilation under Debian 11 --- src/compat/compat.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/compat/compat.h b/src/compat/compat.h index 1993c16..9587653 100644 --- a/src/compat/compat.h +++ b/src/compat/compat.h @@ -1128,6 +1128,7 @@ static const struct header_ops ip_tunnel_header_ops = { .parse_protocol = ip_tun #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 30) +#define COMPAT_HAS_DEFINED_DST_CACHE_PCPU #include struct dst_cache_pcpu { unsigned long refresh_ts; @@ -1138,8 +1139,11 @@ struct dst_cache_pcpu { struct in6_addr in6_saddr; }; }; -#define COMPAT_HAS_DEFINED_DST_CACHE_PCPU -#ifndef ISRHEL9 +#endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) && \ + !(LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 84) && LINUX_VERSION_CODE < KERNEL_VERSION(5, 11, 0)) && \ + !defined(ISRHEL9) static inline void dst_cache_reset_now(struct dst_cache *dst_cache) { int i; @@ -1158,7 +1162,6 @@ static inline void dst_cache_reset_now(struct dst_cache *dst_cache) } } #endif -#endif #if defined(ISUBUNTU1604) || defined(ISRHEL7) #include @@ -1204,7 +1207,8 @@ static inline void dst_cache_reset_now(struct dst_cache *dst_cache) #define from_timer(var, callback_timer, timer_fieldname) container_of((struct timer_list *)callback_timer, typeof(*var), timer_fieldname) #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 11, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 11, 0) && \ + !(LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 121) && LINUX_VERSION_CODE < KERNEL_VERSION(5, 11, 0)) #include #define flowi4_to_flowi_common(fl4) flowi4_to_flowi(fl4) #define flowi6_to_flowi_common(fl4) flowi6_to_flowi(fl4)