From 9f1c7a872e7a13d1ee29b692d0f1f4dd18a07baa Mon Sep 17 00:00:00 2001 From: David Smith Date: Tue, 9 May 2017 16:20:41 -0500 Subject: [PATCH] Avoid missing "task_stack()" definition on 4.11 kernels. * runtime/compatdefs.h: If exists, include it. This avoids a missing task_stack() definition. * buildrun.cxx (compile_pass): Add autoconf test for . * runtime/linux/autoconf-sched-task_stack.c: New file. --- buildrun.cxx | 1 + runtime/compatdefs.h | 4 ++++ runtime/linux/autoconf-sched-task_stack.c | 3 +++ 3 files changed, 8 insertions(+) create mode 100644 runtime/linux/autoconf-sched-task_stack.c diff --git a/buildrun.cxx b/buildrun.cxx index 21ed3c5b8..6da308a01 100644 --- a/buildrun.cxx +++ b/buildrun.cxx @@ -403,6 +403,7 @@ compile_pass (systemtap_session& s) output_autoconf(s, o, "autoconf-smpcall-5args.c", "STAPCONF_SMPCALL_5ARGS", NULL); output_autoconf(s, o, "autoconf-smpcall-4args.c", "STAPCONF_SMPCALL_4ARGS", NULL); output_autoconf(s, o, "autoconf-sched-mm.c", "STAPCONF_SCHED_MM_H", NULL); + output_autoconf(s, o, "autoconf-sched-task_stack.c", "STAPCONF_SCHED_TASK_STACK_H", NULL); // used by tapset/timestamp_monotonic.stp output_exportconf(s, o, "cpu_clock", "STAPCONF_CPU_CLOCK"); diff --git a/runtime/compatdefs.h b/runtime/compatdefs.h index ba429b500..f261bfdbd 100644 --- a/runtime/compatdefs.h +++ b/runtime/compatdefs.h @@ -57,6 +57,10 @@ static inline int _stp_is_compat_task(void) */ #include #include +#include +#ifdef STAPCONF_SCHED_TASK_STACK_H +#include +#endif #if !defined(task_pt_regs) #if defined(__powerpc__) diff --git a/runtime/linux/autoconf-sched-task_stack.c b/runtime/linux/autoconf-sched-task_stack.c new file mode 100644 index 000000000..cdfcc605e --- /dev/null +++ b/runtime/linux/autoconf-sched-task_stack.c @@ -0,0 +1,3 @@ +#include +#include + -- 2.43.5