diff --git a/config/kernel-add-disk.m4 b/config/kernel-add-disk.m4 index 44a8a5fd25..86d81ea325 100644 --- a/config/kernel-add-disk.m4 +++ b/config/kernel-add-disk.m4 @@ -7,8 +7,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_ADD_DISK], [ #include ], [ struct gendisk *disk = NULL; - int err = add_disk(disk); - err = err; + int error __attribute__ ((unused)) = add_disk(disk); ]) ]) diff --git a/module/os/linux/zfs/zpl_xattr.c b/module/os/linux/zfs/zpl_xattr.c index e088db5d29..bd5d5803fb 100644 --- a/module/os/linux/zfs/zpl_xattr.c +++ b/module/os/linux/zfs/zpl_xattr.c @@ -1414,7 +1414,9 @@ zpl_xattr_handler(const char *name) return (NULL); } -#if !defined(HAVE_POSIX_ACL_RELEASE) || defined(HAVE_POSIX_ACL_RELEASE_GPL_ONLY) +#if defined(CONFIG_FS_POSIX_ACL) && \ + (!defined(HAVE_POSIX_ACL_RELEASE) || \ + defined(HAVE_POSIX_ACL_RELEASE_GPL_ONLY)) struct acl_rel_struct { struct acl_rel_struct *next; struct posix_acl *acl;