Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions include/osdep_service_linux.h
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,16 @@ static inline void timer_hdl(struct timer_list *in_timer)
static inline void timer_hdl(unsigned long cntx)
#endif
{
#include <linux/version.h>
#include <linux/timer.h>

/* --- Fix for kernel >=6.14: missing from_timer() helper --- */
#ifndef from_timer
#define from_timer(var, callback_timer, fieldname) \
({ typeof(var) __tmp = (var); \
(_timer *)((char *)(callback_timer) - offsetof(_timer, fieldname)); })
#endif
/* --- end patch --- */
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0))
_timer *ptimer = from_timer(ptimer, in_timer, timer);
#else
Expand Down