summaryrefslogtreecommitdiffhomepage
path: root/src/compat
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-11-12 12:12:53 +0900
committerJason A. Donenfeld <Jason@zx2c4.com>2017-11-14 10:24:20 +0100
commit75b8cad99bdca07d0098daf21792dd2ce507d73d (patch)
treec0ad629caf9bc8142b1c2f02335248a1224c020e /src/compat
parentdbfc216dcfd725073f17cdc27523a1b30b48a1a4 (diff)
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. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/compat')
-rw-r--r--src/compat/compat.h12
1 files changed, 12 insertions, 0 deletions
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 <linux/timer.h>
+#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 */