From: Mathieu Desnoyers Date: Sat, 6 Nov 2021 00:34:27 +0000 (-0400) Subject: Fix: kernels 3.0.x do not implement IS_ENABLED macro X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=1d303f6942646f60243dcf456ed886557472bc4b;p=lttng-modules.git Fix: kernels 3.0.x do not implement IS_ENABLED macro Signed-off-by: Mathieu Desnoyers Change-Id: Id1059e57e4caacd6892b7d18032937650833a080 --- diff --git a/src/lttng-syscalls.c b/src/lttng-syscalls.c index 14c79bc1..bf1f2b73 100644 --- a/src/lttng-syscalls.c +++ b/src/lttng-syscalls.c @@ -642,9 +642,10 @@ void lttng_syscall_event_enabler_create_matching_syscall_table_events(struct ltt const struct lttng_kernel_event_desc *desc; unsigned int i; - if (!IS_ENABLED(CONFIG_COMPAT) && (type == SC_TYPE_COMPAT_ENTRY || type == SC_TYPE_COMPAT_EXIT)) +#ifndef CONFIG_COMPAT + if (type == SC_TYPE_COMPAT_ENTRY || type == SC_TYPE_COMPAT_EXIT) return; - +#endif /* iterate over all syscall and create event that match */ for (i = 0; i < table_len; i++) { struct lttng_kernel_event_common_private *event_priv; @@ -702,9 +703,10 @@ void create_unknown_syscall_event(struct lttng_event_enabler_common *event_enabl bool found = false; struct hlist_head *head; - if (!IS_ENABLED(CONFIG_COMPAT) && (type == SC_TYPE_COMPAT_ENTRY || type == SC_TYPE_COMPAT_EXIT)) +#ifndef CONFIG_COMPAT + if (type == SC_TYPE_COMPAT_ENTRY || type == SC_TYPE_COMPAT_EXIT) return; - +#endif /* * Considering that currently system calls can only be enabled on a per * name basis (or wildcard based on a name), unknown syscall events are