diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-10-31 22:30:37 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-11-01 00:55:19 +0100 |
commit | 7be989478f2fa659b0b6b55dbd72f222b932a5ee (patch) | |
tree | 25bb18fcfff5aee470309c3a8292c7fb1a8cee46 /src/compat | |
parent | wg-quick: save all hooks on save (diff) | |
download | wireguard-monolithic-historical-7be989478f2fa659b0b6b55dbd72f222b932a5ee.tar.xz wireguard-monolithic-historical-7be989478f2fa659b0b6b55dbd72f222b932a5ee.zip |
timers: switch to kees' new timer_list functions
Diffstat (limited to 'src/compat')
-rw-r--r-- | src/compat/compat.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/compat/compat.h b/src/compat/compat.h index cbb00e5..55d6af4 100644 --- a/src/compat/compat.h +++ b/src/compat/compat.h @@ -502,6 +502,11 @@ struct _____dummy_container { char dev; }; #define netdev_notifier_info net_device *)data); __attribute((unused)) char _____dummy = ((struct _____dummy_container #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) +#define timer_setup(a, b, c) setup_timer(a, ((void (*)(unsigned long))b), ((unsigned long)a)) +#define from_timer(var, callback_timer, timer_fieldname) container_of(callback_timer, typeof(*var), timer_fieldname) +#endif + /* https://lkml.org/lkml/2017/6/23/790 */ #if IS_ENABLED(CONFIG_NF_CONNTRACK) #include <linux/ip.h> |