From 947cb9afd2d36d00167484183c9a866274f92516 Mon Sep 17 00:00:00 2001 From: "Maxin B. John" Date: Fri, 22 Mar 2013 09:58:53 -0400 Subject: [PATCH] lttng-module: sched.h: Fix compilation on 3.9 kernel With commit 8bd75c77b7c6a3954140dd2e20346aef3efe4a35 included in 3.9-rc1 kernel, rt specific bits in "linux/sched.h" were moved into new header file "linux/sched/rt.h". Fixes this compilation error: CC [M] /home/majo/lttng/lttng-modules/probes/lttng-probe-sched.o ... /home/majo/lttng/lttng-modules/probes/../instrumentation/events/lttng-module /../../../probes/../instrumentation/events/lttng-module/sched.h: In function '__event_probe__sched_switch': /home/majo/lttng/lttng-modules/probes/../instrumentation/events/lttng-module /../../../probes/../instrumentation/events/lttng-module/sched.h:164:1: error: 'MAX_RT_PRIO' undeclared (first use in this function) ... Signed-off-by: Maxin B. John Signed-off-by: Mathieu Desnoyers --- instrumentation/events/lttng-module/sched.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/instrumentation/events/lttng-module/sched.h b/instrumentation/events/lttng-module/sched.h index ca46ed05..eb3446b2 100644 --- a/instrumentation/events/lttng-module/sched.h +++ b/instrumentation/events/lttng-module/sched.h @@ -6,6 +6,9 @@ #include #include +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)) +#include +#endif #ifndef _TRACE_SCHED_DEF_ #define _TRACE_SCHED_DEF_ -- 2.34.1