]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - config/kernel-rename.m4
Merge branch 'zfsonlinux/merge-spl'
[FreeBSD/FreeBSD.git] / 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_RENAME_WANTS_FLAGS], [
7         AC_MSG_CHECKING([whether iops->rename() wants flags])
8         ZFS_LINUX_TRY_COMPILE([
9                 #include <linux/fs.h>
10                 int rename_fn(struct inode *sip, struct dentry *sdp,
11                         struct inode *tip, struct dentry *tdp,
12                         unsigned int flags) { return 0; }
13
14                 static const struct inode_operations
15                     iops __attribute__ ((unused)) = {
16                         .rename = rename_fn,
17                 };
18         ],[
19         ],[
20                 AC_MSG_RESULT(yes)
21                 AC_DEFINE(HAVE_RENAME_WANTS_FLAGS, 1, [iops->rename() wants flags])
22         ],[
23                 AC_MSG_RESULT(no)
24         ])
25 ])