From: Mathieu Desnoyers Date: Thu, 1 Dec 2022 16:33:20 +0000 (-0500) Subject: Fix: in_x32_syscall was introduced in v4.7.0 X-Git-Tag: v2.13.8~2 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=0886cfd71593b8b719b69bf036fb88c3f803087f;p=lttng-modules.git Fix: in_x32_syscall was introduced in v4.7.0 Prior to v4.7.0, is_x32_task() was the API to query whether the current system call is following the x32 ABI. Signed-off-by: Mathieu Desnoyers Change-Id: I783bd3bb46ec5e863ae209f79cee2f1bb415e661 --- diff --git a/src/lttng-syscalls.c b/src/lttng-syscalls.c index 2d3c792a..03c521a1 100644 --- a/src/lttng-syscalls.c +++ b/src/lttng-syscalls.c @@ -32,6 +32,7 @@ #include #include #include +#include #include "lttng-syscalls.h" @@ -43,7 +44,14 @@ /* in_compat_syscall appears in kernel 4.6. */ #ifndef in_compat_syscall - #define in_compat_syscall() is_compat_task() +# define in_compat_syscall() is_compat_task() +#endif + +/* in_x32_syscall appears in kernel 4.7. */ +#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(4,7,0)) +# ifdef CONFIG_X86_X32_ABI +# define in_x32_syscall() is_x32_task() +# endif #endif enum sc_type {