mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-03-11 04:46:18 +03:00
Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Signed-off-by: Rob Norris <robn@despairlabs.com> Closes #18077
29 lines
827 B
Plaintext
29 lines
827 B
Plaintext
dnl # SPDX-License-Identifier: CDDL-1.0
|
|
dnl #
|
|
dnl # 5.3 API change
|
|
dnl # The generic_fadvise() function is present since 4.19 kernel
|
|
dnl # but it was not exported until Linux 5.3.
|
|
dnl #
|
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_GENERIC_FADVISE], [
|
|
ZFS_LINUX_TEST_SRC([generic_fadvise], [
|
|
#include <linux/fs.h>
|
|
], [
|
|
struct file *fp __attribute__ ((unused)) = NULL;
|
|
loff_t offset __attribute__ ((unused)) = 0;
|
|
loff_t len __attribute__ ((unused)) = 0;
|
|
int advise __attribute__ ((unused)) = 0;
|
|
generic_fadvise(fp, offset, len, advise);
|
|
])
|
|
])
|
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_GENERIC_FADVISE], [
|
|
AC_MSG_CHECKING([whether generic_fadvise() is available])
|
|
ZFS_LINUX_TEST_RESULT_SYMBOL([generic_fadvise],
|
|
[generic_fadvise], [mm/fadvise.c], [
|
|
AC_MSG_RESULT(yes)
|
|
AC_DEFINE(HAVE_GENERIC_FADVISE, 1, [yes])
|
|
],[
|
|
AC_MSG_RESULT(no)
|
|
])
|
|
])
|