xref: /freebsd/sys/contrib/openzfs/config/kernel-is_owner_or_cap.m4 (revision 9e5787d2284e187abb5b654d924394a65772e004)
1dnl #
2dnl # 2.6.39 API change,
3dnl # The is_owner_or_cap() macro was renamed to inode_owner_or_capable(),
4dnl # This is used for permission checks in the xattr and file attribute call
5dnl # paths.
6dnl #
7AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OWNER_OR_CAPABLE], [
8	ZFS_LINUX_TEST_SRC([inode_owner_or_capable], [
9		#include <linux/fs.h>
10	],[
11		struct inode *ip = NULL;
12		(void) inode_owner_or_capable(ip);
13	])
14])
15
16AC_DEFUN([ZFS_AC_KERNEL_INODE_OWNER_OR_CAPABLE], [
17	AC_MSG_CHECKING([whether inode_owner_or_capable() exists])
18	ZFS_LINUX_TEST_RESULT([inode_owner_or_capable], [
19		AC_MSG_RESULT(yes)
20	],[
21		ZFS_LINUX_TEST_ERROR([capability])
22	])
23])
24