From 3cfd5ff6298941a050d9f988d5e8ee857f5f34bb Mon Sep 17 00:00:00 2001 From: "YU-WEI,HSU" Date: Sat, 6 Sep 2025 14:56:33 +0800 Subject: [PATCH] Fix build error on Linux >= 6.12 by guarding no_llseek Linux 6.12 removed the no_llseek macro. Add a version check so that .llseek = no_llseek is only used on kernels prior to 6.12. Thanks to EricccTaiwan for the review and for pointing out that similar cleanup could also be done in this repository. --- simrupt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/simrupt.c b/simrupt.c index 8cc5735..bcfbb4b 100644 --- a/simrupt.c +++ b/simrupt.c @@ -326,7 +326,9 @@ static const struct file_operations simrupt_fops = { .owner = THIS_MODULE, #endif .read = simrupt_read, +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0) .llseek = no_llseek, +#endif .open = simrupt_open, .release = simrupt_release, };