]> sourceware.org Git - systemtap.git/commitdiff
Avoid missing "task_stack()" definition on 4.11 kernels.
authorDavid Smith <dsmith@redhat.com>
Tue, 9 May 2017 21:20:41 +0000 (16:20 -0500)
committerDavid Smith <dsmith@redhat.com>
Tue, 9 May 2017 21:20:41 +0000 (16:20 -0500)
* 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.

buildrun.cxx
runtime/compatdefs.h
runtime/linux/autoconf-sched-task_stack.c [new file with mode: 0644]

index 21ed3c5b814d9d2b1422ff3db3006325f77df3f3..6da308a011f988fdf7b2773d95e7035455b4a7fc 100644 (file)
@@ -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");
index ba429b50071d1591e9c3cec2805060b345da1df7..f261bfdbda43b0fc4962d3096f089d3efcf102cb 100644 (file)
@@ -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 (file)
index 0000000..cdfcc60
--- /dev/null
@@ -0,0 +1,3 @@
+#include <linux/sched.h>
+#include <linux/sched/task_stack.h>
+
This page took 0.029942 seconds and 5 git commands to generate.