--- compat/compat.h.orig 2017-06-13 16:33:26.000000000 +0100 +++ compat/compat.h 2017-06-24 15:28:38.866637683 +0100 @@ -7,6 +7,9 @@ #include #include +#undef LINUX_VERSION_CODE +#define LINUX_VERSION_CODE KERNEL_VERSION(3, 18, 0) + #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0) #error "WireGuard requires Linux >= 3.10" #endif @@ -29,9 +32,9 @@ #define headers_end data #endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0) -#include "udp_tunnel/udp_tunnel_partial_compat.h" -#endif +//#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0) +//#include "udp_tunnel/udp_tunnel_partial_compat.h" +//#endif #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0) && !defined(DEBUG) && defined(net_dbg_ratelimited) #undef net_dbg_ratelimited @@ -43,14 +46,14 @@ #endif #if (LINUX_VERSION_CODE > KERNEL_VERSION(3, 19, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 6)) || \ - (LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 12) && LINUX_VERSION_CODE > KERNEL_VERSION(3, 17, 0)) || \ - (LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 8) && LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)) || \ - LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 40) -#define dev_recursion_level() 0 + (LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 12) && LINUX_VERSION_CODE > KERNEL_VERSION(3, 17, 0)) || \ + (LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 8) && LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)) || \ + LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 40) +//#define dev_recursion_level() 0 #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0) -#define ipv6_dst_lookup(a, b, c, d) ipv6_dst_lookup(b, c, d) +//#define ipv6_dst_lookup(a, b, c, d) ipv6_dst_lookup(b, c, d) #endif #if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 5) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)) || \ @@ -149,7 +152,7 @@ }) #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0) +//#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0) #include "checksum/checksum_partial_compat.h" static inline void *our_pskb_put(struct sk_buff *skb, struct sk_buff *tail, int len) { @@ -160,7 +163,7 @@ return skb_put(tail, len); } #define pskb_put our_pskb_put -#endif +//#endif #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0) #include