]> git.proxmox.com Git - mirror_spl.git/blob - config/kernel-fallocate-pax.m4
Prepare SPL repo to merge with ZFS repo
[mirror_spl.git] / config / kernel-fallocate-pax.m4
1 dnl #
2 dnl # PaX Linux 2.6.38 - 3.x API
3 dnl #
4 AC_DEFUN([SPL_AC_PAX_KERNEL_FILE_FALLOCATE], [
5 AC_MSG_CHECKING([whether fops->fallocate() exists])
6 SPL_LINUX_TRY_COMPILE([
7 #include <linux/fs.h>
8 ],[
9 long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL;
10 struct file_operations_no_const fops __attribute__ ((unused)) = {
11 .fallocate = fallocate,
12 };
13 ],[
14 AC_MSG_RESULT(yes)
15 AC_DEFINE(HAVE_FILE_FALLOCATE, 1, [fops->fallocate() exists])
16 ],[
17 AC_MSG_RESULT(no)
18 ])
19 ])