Skip to content

Commit

Permalink
Fix HAVE_MUTEX_OWNER test for kernels prior to 4.6
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#566
  • Loading branch information
dweeezil authored and behlendorf committed Aug 1, 2016
1 parent 4b9dddf commit 576865b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions config/spl-build.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 576865b

Please sign in to comment.