Fix HAVE_MUTEX_OWNER test for kernels prior to 4.6

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
This commit is contained in:
Tim Chase 2016-08-01 08:19:19 -05:00 committed by Brian Behlendorf
parent 4b9dddf430
commit 576865be20

View 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));