const struct xattr_handler *xattr_handlers[] = {
&xattr_test_handler,
};
- ],[
- struct super_block sb __attribute__ ((unused));
- sb.s_xattr = xattr_handlers;
+ const struct super_block sb __attribute__ ((unused)) = {
+ .s_xattr = xattr_handlers,
+ };
+ ],[
],[
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_CONST_XATTR_HANDLER, 1,
AC_MSG_CHECKING([whether xattr_handler->get() wants dentry])
ZFS_LINUX_TRY_COMPILE([
#include <linux/xattr.h>
- ],[
- int (*get)(struct dentry *dentry, const char *name,
- void *buffer, size_t size, int handler_flags) = NULL;
- struct xattr_handler xops __attribute__ ((unused));
- xops.get = get;
+ int get(struct dentry *dentry, const char *name,
+ void *buffer, size_t size, int handler_flags) { return 0; }
+ static const struct xattr_handler
+ xops __attribute__ ((unused)) = {
+ .get = get,
+ };
+ ],[
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_DENTRY_XATTR_GET, 1,
AC_MSG_CHECKING([whether xattr_handler->set() wants dentry])
ZFS_LINUX_TRY_COMPILE([
#include <linux/xattr.h>
- ],[
- int (*set)(struct dentry *dentry, const char *name,
- const void *buffer, size_t size, int flags,
- int handler_flags) = NULL;
- struct xattr_handler xops __attribute__ ((unused));
- xops.set = set;
+ int set(struct dentry *dentry, const char *name,
+ const void *buffer, size_t size, int flags,
+ int handler_flags) { return 0; }
+ static const struct xattr_handler
+ xops __attribute__ ((unused)) = {
+ .set = set,
+ };
+ ],[
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_DENTRY_XATTR_SET, 1,