From bfc392e1d9a59c30fdcd9bb502ee8e7787911be0 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sun, 26 Apr 2020 15:42:33 -0600 Subject: compat: prefix icmp[v6]_ndo_send with __compat Some distros that backported icmp[v6]_ndo_send still try to build the compat module in some corner case circumstances, resulting in errors. Work around this with the usual __compat games. Signed-off-by: Jason A. Donenfeld --- src/compat/compat.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/compat/compat.h') diff --git a/src/compat/compat.h b/src/compat/compat.h index bb996b8..1473319 100644 --- a/src/compat/compat.h +++ b/src/compat/compat.h @@ -959,7 +959,7 @@ static inline int skb_ensure_writable(struct sk_buff *skb, int write_len) #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0) #include #endif -static inline void icmp_ndo_send(struct sk_buff *skb_in, int type, int code, __be32 info) +static inline void __compat_icmp_ndo_send(struct sk_buff *skb_in, int type, int code, __be32 info) { struct sk_buff *cloned_skb = NULL; enum ip_conntrack_info ctinfo; @@ -988,7 +988,7 @@ static inline void icmp_ndo_send(struct sk_buff *skb_in, int type, int code, __b out: consume_skb(cloned_skb); } -static inline void icmpv6_ndo_send(struct sk_buff *skb_in, u8 type, u8 code, __u32 info) +static inline void __compat_icmpv6_ndo_send(struct sk_buff *skb_in, u8 type, u8 code, __u32 info) { struct sk_buff *cloned_skb = NULL; enum ip_conntrack_info ctinfo; @@ -1018,9 +1018,11 @@ out: consume_skb(cloned_skb); } #else -#define icmp_ndo_send icmp_send -#define icmpv6_ndo_send icmpv6_send +#define __compat_icmp_ndo_send icmp_send +#define __compat_icmpv6_ndo_send icmpv6_send #endif +#define icmp_ndo_send __compat_icmp_ndo_send +#define icmpv6_ndo_send __compat_icmpv6_ndo_send #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) -- cgit v1.2.3-59-g8ed1b