]> git.proxmox.com Git - mirror_spl.git/commitdiff
Fix HAVE_MUTEX_OWNER test for kernels prior to 4.6
authorTim Chase <tim@chase2k.com>
Mon, 1 Aug 2016 13:19:19 +0000 (08:19 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 1 Aug 2016 19:45:08 +0000 (12:45 -0700)
Recent 4.X kernels prior to 4.6 require #include of spinlock.h in
order to get the definition of __ARCH_SPIN_LOCK_UNLOCKED which is
used by DEFINE_MUTEX().

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #566

config/spl-build.m4

index 3ed0e8fd0d629c04119ceda6b56ddcea6eaa9c44..94e692a8bfedf4c32fa868f215277e3d0e67318d 100644 (file)
@@ -1537,6 +1537,7 @@ AC_DEFUN([SPL_AC_MUTEX_OWNER], [
        EXTRA_KCFLAGS="-Werror"
        SPL_LINUX_TRY_COMPILE([
                #include <linux/mutex.h>
+               #include <linux/spinlock.h>
        ],[
                DEFINE_MUTEX(m);
                struct task_struct *t __attribute__ ((unused));