From 962fedb52d39b18406aad8551dc69f2c0c766af5 Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Thu, 20 Jun 2024 11:15:59 -0400 Subject: [PATCH] Fix: Build on CentOS 9 Stream 2024-06 Change-Id: I445d2df9d49930e28e57b6a7d075a9f68e914bad Signed-off-by: Kienan Stewart Signed-off-by: Mathieu Desnoyers --- include/instrumentation/events/lttng-statedump.h | 3 ++- include/instrumentation/events/sched.h | 3 ++- include/instrumentation/events/timer.h | 3 ++- include/wrapper/mm.h | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/include/instrumentation/events/lttng-statedump.h b/include/instrumentation/events/lttng-statedump.h index 228b106f..05b3bd76 100644 --- a/include/instrumentation/events/lttng-statedump.h +++ b/include/instrumentation/events/lttng-statedump.h @@ -266,7 +266,8 @@ LTTNG_TRACEPOINT_EVENT(lttng_statedump_interrupt, #define LTTNG_HAVE_STATEDUMP_CPU_TOPOLOGY -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,7,0)) +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,7,0) || \ + LTTNG_RHEL_KERNEL_RANGE(5,14,0,452,0,0, 5,15,0,0,0,0)) LTTNG_TRACEPOINT_EVENT(lttng_statedump_cpu_topology, TP_PROTO(struct lttng_kernel_session *session, struct cpuinfo_x86 *c), TP_ARGS(session, c), diff --git a/include/instrumentation/events/sched.h b/include/instrumentation/events/sched.h index 24cf37c8..32d18133 100644 --- a/include/instrumentation/events/sched.h +++ b/include/instrumentation/events/sched.h @@ -646,7 +646,8 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_stat_template, sched_stat_blocked, TP_ARGS(tsk, delay)) #endif -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,8,0)) +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,8,0) || \ + LTTNG_RHEL_KERNEL_RANGE(5,14,0,452,0,0, 5,15,0,0,0,0)) /* * Tracepoint for accounting runtime (time the task is executing * on a CPU). diff --git a/include/instrumentation/events/timer.h b/include/instrumentation/events/timer.h index 77c4111a..9cce7d24 100644 --- a/include/instrumentation/events/timer.h +++ b/include/instrumentation/events/timer.h @@ -45,7 +45,8 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(timer_class, timer_init, TP_ARGS(timer) ) -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,8,0)) +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,8,0) || \ + LTTNG_RHEL_KERNEL_RANGE(5,14,0,457,0,0, 5,15,0,0,0,0)) /** * timer_start - called when the timer is started * @timer: pointer to struct timer_list diff --git a/include/wrapper/mm.h b/include/wrapper/mm.h index 61ac8127..060b6f92 100644 --- a/include/wrapper/mm.h +++ b/include/wrapper/mm.h @@ -13,7 +13,8 @@ #include -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0)) +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0) || \ + LTTNG_RHEL_KERNEL_RANGE(5,14,0,452,0,0, 5,15,0,0,0,0)) static inline void wrapper_vm_flags_set(struct vm_area_struct *vma, vm_flags_t flags) -- 2.34.1