]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Fix config for posix_acl_release() GPL test
authorChunwei Chen <david.chen@osnexus.com>
Wed, 18 May 2016 20:48:08 +0000 (13:48 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 20 May 2016 18:09:00 +0000 (11:09 -0700)
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

config/kernel-acl.m4

index 1cb28b25a6f4dd58d791073e7ee7c365ced26a88..ffb6a02547cdd8686e59ae2f7ec5eb32e7a4261d 100644 (file)
@@ -16,26 +16,27 @@ 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_RESULT(no)
-       ])
 
-       AC_MSG_CHECKING([whether posix_acl_release() is GPL-only])
-       ZFS_LINUX_TRY_COMPILE([
-               #include <linux/cred.h>
-               #include <linux/fs.h>
-               #include <linux/posix_acl.h>
+               AC_MSG_CHECKING([whether posix_acl_release() is GPL-only])
+               ZFS_LINUX_TRY_COMPILE([
+                       #include <linux/module.h>
+                       #include <linux/cred.h>
+                       #include <linux/fs.h>
+                       #include <linux/posix_acl.h>
 
-               MODULE_LICENSE("$ZFS_META_LICENSE");
-       ],[
-               struct posix_acl* tmp = posix_acl_alloc(1, 0);
-               posix_acl_release(tmp);
+                       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_RESULT(yes)
-               AC_DEFINE(HAVE_POSIX_ACL_RELEASE_GPL_ONLY, 1,
-                   [posix_acl_release() is GPL-only])
        ])
 ])