]>
Commit | Line | Data |
---|---|---|
1 | dnl # | |
2 | dnl # 2.6.39 API change, | |
3 | dnl # The is_owner_or_cap() macro was renamed to inode_owner_or_capable(), | |
4 | dnl # This is used for permission checks in the xattr and file attribute call | |
5 | dnl # paths. | |
6 | dnl # | |
7 | AC_DEFUN([ZFS_AC_KERNEL_INODE_OWNER_OR_CAPABLE], [ | |
8 | AC_MSG_CHECKING([whether inode_owner_or_capable() exists]) | |
9 | ZFS_LINUX_TRY_COMPILE([ | |
10 | #include <linux/fs.h> | |
11 | ],[ | |
12 | struct inode *ip = NULL; | |
13 | (void) inode_owner_or_capable(ip); | |
14 | ],[ | |
15 | AC_MSG_RESULT(yes) | |
16 | AC_DEFINE(HAVE_INODE_OWNER_OR_CAPABLE, 1, | |
17 | [inode_owner_or_capable() exists]) | |
18 | ],[ | |
19 | AC_MSG_RESULT(no) | |
20 | AC_MSG_CHECKING([whether is_owner_or_cap() exists]) | |
21 | ZFS_LINUX_TRY_COMPILE([ | |
22 | #include <linux/fs.h> | |
23 | #include <linux/sched.h> | |
24 | ],[ | |
25 | struct inode *ip = NULL; | |
26 | (void) is_owner_or_cap(ip); | |
27 | ],[ | |
28 | AC_MSG_RESULT(yes) | |
29 | AC_DEFINE(HAVE_IS_OWNER_OR_CAP, 1, | |
30 | [is_owner_or_cap() exists]) | |
31 | ],[ | |
32 | AC_MSG_ERROR(no - Please file a bug report at | |
33 | https://github.com/zfsonlinux/zfs/issues/new) | |
34 | ]) | |
35 | ]) | |
36 | ]) |