From fbabbca365d8401203dcfa095b8c71e77e091936 Mon Sep 17 00:00:00 2001 From: Mark Vitale Date: Thu, 23 Mar 2017 15:10:03 -0700 Subject: [PATCH] Linux v4.11: signal stuff moved to sched/signal.h In Linux commit c3edc4010e9d102eb7b8f17d15c2ebc425fed63c, signal_struct and other signal handling declarations were moved from sched.h to sched/signal.h. This breaks existing OpenAFS autoconf tests for recalc_sigpending() and task_struct.signal->rlim, so that the OpenAFS kernel module can no longer build. Modify OpenAFS autoconfig tests to cope. Reviewed-on: https://gerrit.openafs.org/12573 Tested-by: BuildBot Reviewed-by: Joe Gorse Tested-by: Joe Gorse Reviewed-by: Benjamin Kaduk Reviewed-by: Michael Meffie (cherry picked from commit ad001550949b612ff6b4899fa8da50ee58f87533) Change-Id: I491208d77e45d45cc0089b8033892a6408da431c Reviewed-on: https://gerrit.openafs.org/12589 Tested-by: BuildBot Reviewed-by: Mark Vitale Reviewed-by: Stephan Wiesand --- acinclude.m4 | 1 + src/afs/sysincludes.h | 3 +++ src/cf/linux-test4.m4 | 10 ++++++++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 95157470f9..937fb5661b 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -875,6 +875,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) AC_CHECK_LINUX_HEADER([key-type.h]) AC_CHECK_LINUX_HEADER([semaphore.h]) AC_CHECK_LINUX_HEADER([seq_file.h]) + AC_CHECK_LINUX_HEADER([sched/signal.h]) dnl Type existence checks AC_CHECK_LINUX_TYPE([struct vfs_path], [dcache.h]) diff --git a/src/afs/sysincludes.h b/src/afs/sysincludes.h index 4c45cc8c5e..c2abb373a3 100644 --- a/src/afs/sysincludes.h +++ b/src/afs/sysincludes.h @@ -158,6 +158,9 @@ struct xfs_inode_info { # include # include # include +# if defined(HAVE_LINUX_SCHED_SIGNAL_H) +# include +# endif # include # include # include diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4 index 194c1ef6ce..46323edda6 100644 --- a/src/cf/linux-test4.m4 +++ b/src/cf/linux-test4.m4 @@ -128,7 +128,10 @@ AC_DEFUN([LINUX_EXPORTS_SYS_OPEN], [ AC_DEFUN([LINUX_RECALC_SIGPENDING_ARG_TYPE], [ AC_CHECK_LINUX_BUILD([for recalc_sigpending arg type], [ac_cv_linux_func_recalc_sigpending_takes_void], - [#include ], +[#include +#ifdef HAVE_LINUX_SCHED_SIGNAL_H +#include +#endif], [recalc_sigpending();], [RECALC_SIGPENDING_TAKES_VOID], [define if your recalc_sigpending takes void], @@ -139,7 +142,10 @@ AC_DEFUN([LINUX_RECALC_SIGPENDING_ARG_TYPE], [ AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGNAL_RLIM], [ AC_CHECK_LINUX_BUILD([for signal->rlim in struct task_struct], [ac_cv_linux_sched_struct_task_struct_has_signal_rlim], - [#include ], +[#include +#ifdef HAVE_LINUX_SCHED_SIGNAL_H +#include +#endif], [struct task_struct _tsk; printk("%d\n", _tsk.signal->rlim);], [STRUCT_TASK_STRUCT_HAS_SIGNAL_RLIM], [define if your struct task_struct has signal->rlim],