]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/contrib/openzfs/config/kernel-rename.m4
MFV 2.0-rc2
[FreeBSD/FreeBSD.git] / sys / contrib / openzfs / config / kernel-rename.m4
1 dnl #
2 dnl # 4.9 API change,
3 dnl # iops->rename2() merged into iops->rename(), and iops->rename() now wants
4 dnl # flags.
5 dnl #
6 AC_DEFUN([ZFS_AC_KERNEL_SRC_RENAME_WANTS_FLAGS], [
7         ZFS_LINUX_TEST_SRC([inode_operations_rename], [
8                 #include <linux/fs.h>
9                 int rename_fn(struct inode *sip, struct dentry *sdp,
10                         struct inode *tip, struct dentry *tdp,
11                         unsigned int flags) { return 0; }
12
13                 static const struct inode_operations
14                     iops __attribute__ ((unused)) = {
15                         .rename = rename_fn,
16                 };
17         ],[])
18 ])
19
20 AC_DEFUN([ZFS_AC_KERNEL_RENAME_WANTS_FLAGS], [
21         AC_MSG_CHECKING([whether iops->rename() wants flags])
22         ZFS_LINUX_TEST_RESULT([inode_operations_rename], [
23                 AC_MSG_RESULT(yes)
24                 AC_DEFINE(HAVE_RENAME_WANTS_FLAGS, 1,
25                     [iops->rename() wants flags])
26         ],[
27                 AC_MSG_RESULT(no)
28         ])
29 ])