49 lines
1.8 KiB
Diff
49 lines
1.8 KiB
Diff
commit 9f1c7a872e7a13d1ee29b692d0f1f4dd18a07baa
|
|
Author: David Smith <dsmith@redhat.com>
|
|
Date: Tue May 9 16:20:41 2017 -0500
|
|
|
|
Avoid missing "task_stack()" definition on 4.11 kernels.
|
|
|
|
* runtime/compatdefs.h: If <linux/sched/task_stack.h> exists, include
|
|
it. This avoids a missing task_stack() definition.
|
|
* buildrun.cxx (compile_pass): Add autoconf test for
|
|
<linux/sched/task_stack.h>.
|
|
* runtime/linux/autoconf-sched-task_stack.c: New file.
|
|
|
|
diff --git a/buildrun.cxx b/buildrun.cxx
|
|
index 21ed3c5..6da308a 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 ba429b5..f261bfd 100644
|
|
--- a/runtime/compatdefs.h
|
|
+++ b/runtime/compatdefs.h
|
|
@@ -57,6 +57,10 @@ static inline int _stp_is_compat_task(void)
|
|
*/
|
|
#include <asm/processor.h>
|
|
#include <asm/ptrace.h>
|
|
+#include <linux/sched.h>
|
|
+#ifdef STAPCONF_SCHED_TASK_STACK_H
|
|
+#include <linux/sched/task_stack.h>
|
|
+#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 0000000..cdfcc60
|
|
--- /dev/null
|
|
+++ b/runtime/linux/autoconf-sched-task_stack.c
|
|
@@ -0,0 +1,3 @@
|
|
+#include <linux/sched.h>
|
|
+#include <linux/sched/task_stack.h>
|
|
+
|