From df318d1f0526663a2d92439376379e32ebcfef1a Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sun, 12 Nov 2017 12:12:53 +0900 Subject: compat: fix compilation with PaX Despite not having access to the latest grsecurity source, I still do very much want to keep supporting it, so this patch is my best guess at what will work. --- src/compat/compat.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/compat/compat.h b/src/compat/compat.h index e4dd226..276e7c9 100644 --- a/src/compat/compat.h +++ b/src/compat/compat.h @@ -561,5 +561,17 @@ static inline void new_icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 #undef __read_mostly #define __read_mostly #endif +#if defined(RAP_PLUGIN) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0) +#include +#define expired_retransmit_handshake(a) expired_retransmit_handshake(unsigned long timer) +#define expired_send_keepalive(a) expired_send_keepalive(unsigned long timer) +#define expired_new_handshake(a) expired_new_handshake(unsigned long timer) +#define expired_zero_key_material(a) expired_zero_key_material(unsigned long timer) +#define expired_send_persistent_keepalive(a) expired_send_persistent_keepalive(unsigned long timer) +#undef timer_setup +#define timer_setup(a, b, c) setup_timer(a, ((void (*)(unsigned long))b), ((unsigned long)a)) +#undef from_timer +#define from_timer(var, callback_timer, timer_fieldname) container_of((struct timer_list *)callback_timer, typeof(*var), timer_fieldname) +#endif #endif /* _WG_COMPAT_H */ -- cgit v1.2.3-59-g8ed1b