From 42ef0150736a691224724594653c998962f315e5 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 28 Jul 2017 00:59:44 +0200 Subject: compat: get rid of warnings on frankenkernels --- src/compat/compat.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/compat/compat.h') diff --git a/src/compat/compat.h b/src/compat/compat.h index 67240ce..e9ea77b 100644 --- a/src/compat/compat.h +++ b/src/compat/compat.h @@ -138,9 +138,16 @@ static inline void netif_keep_dst(struct net_device *dev) #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0) && !defined(ISRHEL7) +#include +#ifndef netdev_alloc_pcpu_stats #define pcpu_sw_netstats pcpu_tstats +#endif +#ifndef netdev_alloc_pcpu_stats #define netdev_alloc_pcpu_stats alloc_percpu +#endif #elif LINUX_VERSION_CODE < KERNEL_VERSION(3, 15, 0) && !defined(ISRHEL7) +#include +#ifndef netdev_alloc_pcpu_stats #define netdev_alloc_pcpu_stats(type) \ ({ \ typeof(type) __percpu *pcpu_stats = alloc_percpu(type); \ @@ -155,6 +162,7 @@ static inline void netif_keep_dst(struct net_device *dev) pcpu_stats; \ }) #endif +#endif #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0) #include "checksum/checksum_partial_compat.h" -- cgit v1.2.3-59-g8ed1b