]> git.proxmox.com Git - mirror_zfs.git/blame - config/kernel-filemap-splice-read.m4
Linux 6.5 compat: replace generic_file_splice_read with filemap_splice_read
[mirror_zfs.git] / config / kernel-filemap-splice-read.m4
CommitLineData
36261c82
CK
1AC_DEFUN([ZFS_AC_KERNEL_SRC_FILEMAP_SPLICE_READ], [
2 dnl #
3 dnl # Kernel 6.5 - generic_file_splice_read was removed in favor
4 dnl # of filemap_splice_read for the .splice_read member of the
5 dnl # file_operations struct.
6 dnl #
7 ZFS_LINUX_TEST_SRC([has_filemap_splice_read], [
8 #include <linux/fs.h>
9
10 struct file_operations fops __attribute__((unused)) = {
11 .splice_read = filemap_splice_read,
12 };
13 ],[])
14])
15
16AC_DEFUN([ZFS_AC_KERNEL_FILEMAP_SPLICE_READ], [
17 AC_MSG_CHECKING([whether filemap_splice_read() exists])
18 ZFS_LINUX_TEST_RESULT([has_filemap_splice_read], [
19 AC_MSG_RESULT(yes)
20 AC_DEFINE(HAVE_FILEMAP_SPLICE_READ, 1,
21 [filemap_splice_read exists])
22 ],[
23 AC_MSG_RESULT(no)
24 ])
25])