2023-08-09 01:42:32 +03:00
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_COPY_SPLICE_READ], [
|
2023-08-08 01:47:46 +03:00
|
|
|
dnl #
|
|
|
|
dnl # Kernel 6.5 - generic_file_splice_read was removed in favor
|
2023-08-09 01:42:32 +03:00
|
|
|
dnl # of copy_splice_read for the .splice_read member of the
|
2023-08-08 01:47:46 +03:00
|
|
|
dnl # file_operations struct.
|
|
|
|
dnl #
|
2023-08-09 01:42:32 +03:00
|
|
|
ZFS_LINUX_TEST_SRC([has_copy_splice_read], [
|
2023-08-08 01:47:46 +03:00
|
|
|
#include <linux/fs.h>
|
|
|
|
|
|
|
|
struct file_operations fops __attribute__((unused)) = {
|
2023-08-09 01:42:32 +03:00
|
|
|
.splice_read = copy_splice_read,
|
2023-08-08 01:47:46 +03:00
|
|
|
};
|
|
|
|
],[])
|
|
|
|
])
|
|
|
|
|
2023-08-09 01:42:32 +03:00
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_COPY_SPLICE_READ], [
|
|
|
|
AC_MSG_CHECKING([whether copy_splice_read() exists])
|
|
|
|
ZFS_LINUX_TEST_RESULT([has_copy_splice_read], [
|
2023-08-08 01:47:46 +03:00
|
|
|
AC_MSG_RESULT(yes)
|
2023-08-09 01:42:32 +03:00
|
|
|
AC_DEFINE(HAVE_COPY_SPLICE_READ, 1,
|
|
|
|
[copy_splice_read exists])
|
2023-08-08 01:47:46 +03:00
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
])
|
|
|
|
])
|