xref: /freebsd/sys/contrib/openzfs/config/kernel-rename.m4 (revision ae41709ab46305df80f7f35bb478a3c8ebf22ebb)
1dnl #
2dnl # 4.9 API change,
3dnl # iops->rename2() merged into iops->rename(), and iops->rename() now wants
4dnl # flags.
5dnl #
6AC_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
20AC_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])
30