diff --git a/config/spl-build.m4 b/config/spl-build.m4 index fc0efcf39cbd..1dbc87e61516 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -43,6 +43,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_RWSEM_ACTIVITY SPL_AC_RWSEM_ATOMIC_LONG_COUNT SPL_AC_SCHED_RT_HEADER + SPL_AC_SCHED_SIGNAL_HEADER SPL_AC_4ARGS_VFS_GETATTR SPL_AC_3ARGS_VFS_GETATTR SPL_AC_2ARGS_VFS_GETATTR @@ -1411,6 +1412,24 @@ AC_DEFUN([SPL_AC_SCHED_RT_HEADER], ]) ]) +dnl # +dnl # 4.11 API change, +dnl # Moved things from linux/sched.h to linux/sched/signal.h +dnl # +AC_DEFUN([SPL_AC_SCHED_SIGNAL_HEADER], + [AC_MSG_CHECKING([whether header linux/sched/signal.h exists]) + SPL_LINUX_TRY_COMPILE([ + #include + #include + ],[ + return 0; + ],[ + AC_DEFINE(HAVE_SCHED_SIGNAL_HEADER, 1, [linux/sched/signal.h exists]) + AC_MSG_RESULT(yes) + ],[ + AC_MSG_RESULT(no) + ]) +]) dnl # dnl # 4.11 API, a528d35e@torvalds/linux diff --git a/include/sys/signal.h b/include/sys/signal.h index 823fea32912e..77cc2d3c2fb5 100644 --- a/include/sys/signal.h +++ b/include/sys/signal.h @@ -27,6 +27,10 @@ #include +#ifdef HAVE_SCHED_SIGNAL_HEADER +#include +#endif + #define FORREAL 0 /* Usual side-effects */ #define JUSTLOOKING 1 /* Don't stop the process */