Fix: kernels 3.0.x do not implement IS_ENABLED macro
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 6 Nov 2021 00:34:27 +0000 (20:34 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 6 Nov 2021 00:34:27 +0000 (20:34 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Id1059e57e4caacd6892b7d18032937650833a080

src/lttng-syscalls.c

index 14c79bc1ccb3a200c679c1472f41d6529b797674..bf1f2b732217397cf3e489bdb3e5f260f24dc361 100644 (file)
@@ -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
This page took 0.035254 seconds and 4 git commands to generate.