From e42d46664e81136f3e9b7030fe77f0550e615c3f Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Wed, 18 May 2016 13:48:08 -0700 Subject: [PATCH] Fix config for posix_acl_release() GPL test The GPL test for posix_acl_release() didn't include . Also run this test only when posix_acl_release() exists. Signed-off-by: Chunwei Chen Signed-off-by: Brian Behlendorf Issue #4665 --- config/kernel-acl.m4 | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/config/kernel-acl.m4 b/config/kernel-acl.m4 index 1cb28b25a6..ffb6a02547 100644 --- a/config/kernel-acl.m4 +++ b/config/kernel-acl.m4 @@ -16,27 +16,28 @@ AC_DEFUN([ZFS_AC_KERNEL_POSIX_ACL_RELEASE], [ AC_MSG_RESULT(yes) AC_DEFINE(HAVE_POSIX_ACL_RELEASE, 1, [posix_acl_release() is available]) + + AC_MSG_CHECKING([whether posix_acl_release() is GPL-only]) + ZFS_LINUX_TRY_COMPILE([ + #include + #include + #include + #include + + MODULE_LICENSE("$ZFS_META_LICENSE"); + ],[ + struct posix_acl* tmp = posix_acl_alloc(1, 0); + posix_acl_release(tmp); + ],[ + AC_MSG_RESULT(no) + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_POSIX_ACL_RELEASE_GPL_ONLY, 1, + [posix_acl_release() is GPL-only]) + ]) ],[ AC_MSG_RESULT(no) ]) - - AC_MSG_CHECKING([whether posix_acl_release() is GPL-only]) - ZFS_LINUX_TRY_COMPILE([ - #include - #include - #include - - MODULE_LICENSE("$ZFS_META_LICENSE"); - ],[ - struct posix_acl* tmp = posix_acl_alloc(1, 0); - posix_acl_release(tmp); - ],[ - AC_MSG_RESULT(no) - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_POSIX_ACL_RELEASE_GPL_ONLY, 1, - [posix_acl_release() is GPL-only]) - ]) ]) dnl #