Skip to content

Commit f78d38a

Browse files
committed
-* src/timers.c and src/device.c: map del_timer[_sync] to timer_delete[_sync] on kernel >= 6.15, per linux 326534e837 and 8fa7292fee.
1 parent 987a2fe commit f78d38a

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/device.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@
3232
#include <net/gso.h>
3333
#endif
3434

35+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
36+
/* see linux 326534e837 and 8fa7292fee */
37+
#define del_timer timer_delete
38+
#define del_timer_sync timer_delete_sync
39+
#endif
40+
3541
static LIST_HEAD(device_list);
3642

3743
static int wg_open(struct net_device *dev)

src/timers.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@
2626
* specified seconds.
2727
*/
2828

29+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
30+
/* see linux 326534e837 and 8fa7292fee */
31+
#define del_timer timer_delete
32+
#define del_timer_sync timer_delete_sync
33+
#endif
34+
2935
static inline void mod_peer_timer(struct wg_peer *peer,
3036
struct timer_list *timer,
3137
unsigned long expires)

0 commit comments

Comments
 (0)