Fix HAVE_MUTEX_OWNER_TASK_STRUCT autotools check on PPC64

The HAVE_MUTEX_OWNER_TASK_STRUCT fails on PPC64 with the following
error:

error: 'current' undeclared (first use in this function)

We include linux/sched.h to ensure that current is available.

Signed-off-by: Richard Yao <ryao@cs.stonybrook.edu>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
Richard Yao 2013-02-05 16:42:29 -05:00 committed by Brian Behlendorf
parent dd3678fc29
commit a0625691b3

View File

@ -1269,6 +1269,7 @@ AC_DEFUN([SPL_AC_MUTEX_OWNER_TASK_STRUCT], [
EXTRA_KCFLAGS="-Werror"
SPL_LINUX_TRY_COMPILE([
#include <linux/mutex.h>
#include <linux/sched.h>
],[
struct mutex mtx __attribute__ ((unused));
mtx.owner = current;