From 08fa6ebb76a89eaf81d52ee8cfdeea88fac24db6 Mon Sep 17 00:00:00 2001 From: "YU-WEI,HSU" Date: Mon, 1 Sep 2025 03:26:59 +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. --- main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.c b/main.c index 9deaeea..9419037 100644 --- a/main.c +++ b/main.c @@ -457,7 +457,9 @@ static const struct file_operations kxo_fops = { .owner = THIS_MODULE, #endif .read = kxo_read, +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0) .llseek = no_llseek, +#endif .open = kxo_open, .release = kxo_release, .poll = kxo_poll};