From: Mathieu Desnoyers Date: Thu, 25 Aug 2016 21:39:47 +0000 (-0400) Subject: Fix: timer wrapper: support kernels >= 4.8 X-Git-Tag: v2.9.0-rc1~30 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=e9f828cc189b4ac844b8aa7aa31f1e5e4dbcc6d6;p=lttng-modules.git Fix: timer wrapper: support kernels >= 4.8 Signed-off-by: Mathieu Desnoyers --- diff --git a/wrapper/timer.h b/wrapper/timer.h index 441a0172..c1c0c952 100644 --- a/wrapper/timer.h +++ b/wrapper/timer.h @@ -28,7 +28,8 @@ #include -#if (LTTNG_RT_VERSION_CODE >= LTTNG_RT_KERNEL_VERSION(4,6,4,8)) +#if (LTTNG_RT_VERSION_CODE >= LTTNG_RT_KERNEL_VERSION(4,6,4,8) \ + || LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0)) #define lttng_init_timer_pinned(timer) \ init_timer_pinned(timer) @@ -39,7 +40,7 @@ static inline int lttng_mod_timer_pinned(struct timer_list *timer, return mod_timer(timer, expires); } -#else /* #if (LTTNG_RT_VERSION_CODE >= LTTNG_RT_KERNEL_VERSION(4,6,4,8)) */ +#else #define lttng_init_timer_pinned(timer) \ init_timer(timer) @@ -50,6 +51,6 @@ static inline int lttng_mod_timer_pinned(struct timer_list *timer, return mod_timer_pinned(timer, expires); } -#endif /* #else #if (LTTNG_RT_VERSION_CODE >= LTTNG_RT_KERNEL_VERSION(4,6,4,8)) */ +#endif #endif /* _LTTNG_WRAPPER_TIMER_H */