Skip to content

Commit 08fa6eb

Browse files
committed
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.
1 parent c45ea32 commit 08fa6eb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,9 @@ static const struct file_operations kxo_fops = {
457457
.owner = THIS_MODULE,
458458
#endif
459459
.read = kxo_read,
460+
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0)
460461
.llseek = no_llseek,
462+
#endif
461463
.open = kxo_open,
462464
.release = kxo_release,
463465
.poll = kxo_poll};

0 commit comments

Comments
 (0)