Fix config for posix_acl_release() GPL test

The GPL test for posix_acl_release() didn't include <linux/module.h>.
Also run this test only when posix_acl_release() exists.

Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #4665
This commit is contained in:
Chunwei Chen 2016-05-18 13:48:08 -07:00 committed by Brian Behlendorf
parent 68e8f59afb
commit e42d46664e

View File

@ -16,12 +16,10 @@ AC_DEFUN([ZFS_AC_KERNEL_POSIX_ACL_RELEASE], [
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_POSIX_ACL_RELEASE, 1, AC_DEFINE(HAVE_POSIX_ACL_RELEASE, 1,
[posix_acl_release() is available]) [posix_acl_release() is available])
],[
AC_MSG_RESULT(no)
])
AC_MSG_CHECKING([whether posix_acl_release() is GPL-only]) AC_MSG_CHECKING([whether posix_acl_release() is GPL-only])
ZFS_LINUX_TRY_COMPILE([ ZFS_LINUX_TRY_COMPILE([
#include <linux/module.h>
#include <linux/cred.h> #include <linux/cred.h>
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/posix_acl.h> #include <linux/posix_acl.h>
@ -37,6 +35,9 @@ AC_DEFUN([ZFS_AC_KERNEL_POSIX_ACL_RELEASE], [
AC_DEFINE(HAVE_POSIX_ACL_RELEASE_GPL_ONLY, 1, AC_DEFINE(HAVE_POSIX_ACL_RELEASE_GPL_ONLY, 1,
[posix_acl_release() is GPL-only]) [posix_acl_release() is GPL-only])
]) ])
],[
AC_MSG_RESULT(no)
])
]) ])
dnl # dnl #