From a3f8970c8181f44091f987679527e41fa6531d68 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 10 Jan 2020 19:11:46 -0500 Subject: device: skb_list_walk_safe moved upstream This won't be ported to 5.6, of course, but it's still cleaner to get this out of the way. Signed-off-by: Jason A. Donenfeld --- src/compat/compat.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/compat') diff --git a/src/compat/compat.h b/src/compat/compat.h index 824f57c..96f3556 100644 --- a/src/compat/compat.h +++ b/src/compat/compat.h @@ -865,6 +865,15 @@ static inline void skb_mark_not_on_list(struct sk_buff *skb) #define ipv6_dst_lookup_flow(a, b, c, d) ipv6_dst_lookup(a, b, &dst, c) + (void *)0 ?: dst #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) +#include +#ifndef skb_list_walk_safe +#define skb_list_walk_safe(first, skb, next) \ + for ((skb) = (first), (next) = (skb) ? (skb)->next : NULL; (skb); \ + (skb) = (next), (next) = (skb) ? (skb)->next : NULL) +#endif +#endif + #if defined(ISUBUNTU1604) #include #ifndef _WG_LINUX_SIPHASH_H -- cgit v1.2.3