From a0225408e002be8bc207ff37624bad932b92b643 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sun, 20 May 2018 22:18:18 +0200 Subject: compat: work around qcom 4.9 backports Qualcomm backported the get_random_u32 patch, even though kernel.org didn't, which is a problem. They also backported another patch in the same place which defines a new macro variable, so use this as a differentiator. --- src/compat/compat.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compat/compat.h b/src/compat/compat.h index e077188..1b6459d 100644 --- a/src/compat/compat.h +++ b/src/compat/compat.h @@ -124,6 +124,8 @@ static inline void skb_reset_tc(struct sk_buff *skb) #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0) +#include +#ifndef CANARY_MASK #include static inline u32 get_random_u32(void) { @@ -141,6 +143,7 @@ static inline u32 get_random_u32(void) return siphash_2u32(counter++, get_random_int(), &key); } #endif +#endif #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0) && !defined(ISRHEL7) static inline void netif_keep_dst(struct net_device *dev) -- cgit v1.2.3-59-g8ed1b