Add BuildRequires gcc, make, elfutils-libelf-devel
[zfs.git] / config / kernel-setattr-prepare.m4
blob32f7deb77abe1b81983985293c68686fcbbc59d0
1 dnl #
2 dnl # 4.9 API change
3 dnl # The inode_change_ok() function has been renamed setattr_prepare()
4 dnl # and updated to take a dentry rather than an inode.
5 dnl #
6 AC_DEFUN([ZFS_AC_KERNEL_SETATTR_PREPARE],
7         [AC_MSG_CHECKING([whether setattr_prepare() is available])
8         ZFS_LINUX_TRY_COMPILE_SYMBOL([
9                 #include <linux/fs.h>
10         ], [
11                 struct dentry *dentry = NULL;
12                 struct iattr *attr = NULL;
13                 int error;
15                 error = setattr_prepare(dentry, attr);
16         ], [setattr_prepare], [fs/attr.c], [
17                 AC_MSG_RESULT(yes)
18                 AC_DEFINE(HAVE_SETATTR_PREPARE, 1,
19                     [setattr_prepare() is available])
20         ], [
21                 AC_MSG_RESULT(no)
22         ])