Linux 2.6.35 compat, fops->fsync()
[zfs.git] / config / kernel-fsync.m4
1 dnl #
2 dnl # 2.6.35 API change
3 dnl # The dentry argument was deamed unused and dropped in 2.6.36.
4 dnl #
5 AC_DEFUN([ZFS_AC_KERNEL_FSYNC_2ARGS], [
6         AC_MSG_CHECKING([whether fops->fsync() wants 2 args])
7         ZFS_LINUX_TRY_COMPILE([
8                 #include <linux/fs.h>
9         ],[
10                 int (*fsync) (struct file *, int datasync) = NULL;
11                 struct file_operations fops;
12
13                 fops.fsync = fsync;
14         ],[
15                 AC_MSG_RESULT(yes)
16                 AC_DEFINE(HAVE_2ARGS_FSYNC, 1, [fops->fsync() want 2 args])
17         ],[
18                 AC_MSG_RESULT(no)
19         ])
20 ])