Skip to content

Commit 3cfd5ff

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. Thanks to EricccTaiwan for the review and for pointing out that similar cleanup could also be done in this repository.
1 parent feca23f commit 3cfd5ff

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

simrupt.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,9 @@ static const struct file_operations simrupt_fops = {
326326
.owner = THIS_MODULE,
327327
#endif
328328
.read = simrupt_read,
329+
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0)
329330
.llseek = no_llseek,
331+
#endif
330332
.open = simrupt_open,
331333
.release = simrupt_release,
332334
};

0 commit comments

Comments
 (0)