From f97f9d2ea3610304df75769c9106d0a8cf2ad3ec 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 4831a941..84b43a74 100644 --- a/include/instrumentation/events/lttng-statedump.h +++ b/include/instrumentation/events/lttng-statedump.h @@ -253,7 +253,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 5f994759..13c15ce1 100644 --- a/include/instrumentation/events/sched.h +++ b/include/instrumentation/events/sched.h @@ -484,7 +484,8 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_stat_template, sched_stat_blocked, TP_PROTO(struct task_struct *tsk, u64 delay), TP_ARGS(tsk, delay)) -#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 2fc280c1..8cce7127 100644 --- a/include/instrumentation/events/timer.h +++ b/include/instrumentation/events/timer.h @@ -77,7 +77,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 047d9368..4f603f5a 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