| From 13e360f1bc65dba29ba22c46f30ba868bea9805d Mon Sep 17 00:00:00 2001 | |
| From: InterLinked1 <24227567+InterLinked1@users.noreply.github.com> | |
| Date: Sat, 12 Jul 2025 17:52:40 -0400 | |
| Subject: [PATCH] kernel.h: Add wrapper for renamed from_timer function. | |
| from_timer was renamed to timer_container_of in kernel commit | |
| 41cb08555c4164996d67c78b3bf1c658075b75f1 as part of updates to | |
| the timer APIs. Add a compatibility wrapper for kernels >= 6.16.0. | |
| Resolves: #95 | |
| Upstream: https://github.com/asterisk/dahdi-linux/commit/0d864e9f97ba22e340380ce24a1bd366ca33ebc2 | |
| Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> | |
| --- | |
| include/dahdi/kernel.h | 4 ++++ | |
| 1 file changed, 4 insertions(+) | |
| diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h | |
| index ddd3eb4..01fe113 100644 | |
| --- a/include/dahdi/kernel.h | |
| +++ b/include/dahdi/kernel.h | |
| @@ -58,6 +58,10 @@ | |
| #include <linux/poll.h> | |
| +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 16, 0) | |
| +#define from_timer timer_container_of | |
| +#endif | |
| + | |
| #if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) | |
| #define netif_napi_add netif_napi_add_weight | |
| #endif | |
| -- | |
| 2.55.0 | |