]>
Commit | Line | Data |
---|---|---|
777d4af8 BB |
1 | dnl # |
2 | dnl # 2.6.35 API change, | |
3 | dnl # The 'struct xattr_handler' was constified in the generic | |
4 | dnl # super_block structure. | |
5 | dnl # | |
6 | AC_DEFUN([ZFS_AC_KERNEL_CONST_XATTR_HANDLER], | |
7 | [AC_MSG_CHECKING([whether super_block uses const struct xattr_hander]) | |
8 | ZFS_LINUX_TRY_COMPILE([ | |
9 | #include <linux/fs.h> | |
10 | #include <linux/xattr.h> | |
11 | ||
12 | const struct xattr_handler xattr_test_handler = { | |
13 | .prefix = "test", | |
14 | .get = NULL, | |
15 | .set = NULL, | |
16 | }; | |
17 | ||
18 | const struct xattr_handler *xattr_handlers[] = { | |
19 | &xattr_test_handler, | |
20 | }; | |
21 | ],[ | |
22 | struct super_block sb; | |
23 | ||
24 | sb.s_xattr = xattr_handlers; | |
25 | ],[ | |
26 | AC_MSG_RESULT([yes]) | |
27 | AC_DEFINE(HAVE_CONST_XATTR_HANDLER, 1, | |
28 | [super_block uses const struct xattr_hander]) | |
29 | ],[ | |
30 | AC_MSG_RESULT([no]) | |
31 | ]) | |
32 | ]) |