From: Richard Yao Date: Mon, 4 Mar 2013 04:42:32 +0000 (-0500) Subject: Linux 3.9 compat: Include linux/sched/rt.h X-Git-Tag: zfs-0.8.0-rc1~152^2~302^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=10087fe1fa3e4aa4b6722a1d27a47853ebdf47c8;p=zfs Linux 3.9 compat: Include linux/sched/rt.h Linux 3.9 reorganized sched.h, splitting it into numerous files. torvalds/linux@8bd75c77b7c6a3954140dd2e20346aef3efe4a35 moved MAX_PRIO and MAX_RT_PRIO to linux/sched/rt.h. Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf --- diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 3dcc05e65..eef3a76ae 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -88,6 +88,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE SPL_AC_SHRINK_CONTROL_STRUCT SPL_AC_RWSEM_SPINLOCK_IS_RAW + SPL_AC_SCHED_RT_HEADER ]) AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ @@ -2217,3 +2218,22 @@ AC_DEFUN([SPL_AC_RWSEM_SPINLOCK_IS_RAW], [ ]) EXTRA_KCFLAGS="$tmp_flags" ]) + +dnl # +dnl # 3.9 API change, +dnl # Moved things from linux/sched.h to linux/sched/rt.h +dnl # +AC_DEFUN([SPL_AC_SCHED_RT_HEADER], + [AC_MSG_CHECKING([whether header linux/sched/rt.h exists]) + SPL_LINUX_TRY_COMPILE([ + #include + #include + ],[ + return 0; + ],[ + AC_DEFINE(HAVE_SCHED_RT_HEADER, 1, [linux/sched/rt.h exists]) + AC_MSG_RESULT(yes) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 7c4da67fc..b4778b70e 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -26,12 +26,17 @@ #define _SPL_SYSMACROS_H #include +#include #include #include #include #include #include +#ifdef HAVE_SCHED_RT_HEADER +#include +#endif + #ifndef _KERNEL #define _KERNEL __KERNEL__ #endif