2016-10-19 21:19:01 +03:00
|
|
|
dnl #
|
|
|
|
dnl # 4.9 API change,
|
|
|
|
dnl # iops->rename2() merged into iops->rename(), and iops->rename() now wants
|
|
|
|
dnl # flags.
|
|
|
|
dnl #
|
2019-10-01 22:50:34 +03:00
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_RENAME_WANTS_FLAGS], [
|
|
|
|
ZFS_LINUX_TEST_SRC([inode_operations_rename], [
|
2016-10-19 21:19:01 +03:00
|
|
|
#include <linux/fs.h>
|
|
|
|
int rename_fn(struct inode *sip, struct dentry *sdp,
|
|
|
|
struct inode *tip, struct dentry *tdp,
|
|
|
|
unsigned int flags) { return 0; }
|
|
|
|
|
|
|
|
static const struct inode_operations
|
|
|
|
iops __attribute__ ((unused)) = {
|
|
|
|
.rename = rename_fn,
|
|
|
|
};
|
2019-10-01 22:50:34 +03:00
|
|
|
],[])
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_RENAME_WANTS_FLAGS], [
|
|
|
|
AC_MSG_CHECKING([whether iops->rename() wants flags])
|
|
|
|
ZFS_LINUX_TEST_RESULT([inode_operations_rename], [
|
2016-10-19 21:19:01 +03:00
|
|
|
AC_MSG_RESULT(yes)
|
2019-10-01 22:50:34 +03:00
|
|
|
AC_DEFINE(HAVE_RENAME_WANTS_FLAGS, 1,
|
|
|
|
[iops->rename() wants flags])
|
2016-10-19 21:19:01 +03:00
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
])
|
|
|
|
])
|