Fix: in_x32_syscall was introduced in v4.7.0
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 1 Dec 2022 16:39:45 +0000 (11:39 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 1 Dec 2022 16:39:45 +0000 (11:39 -0500)
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 <mathieu.desnoyers@efficios.com>
Change-Id: I51f4f07f94592eaed5c55883247744d59f90fce1

lttng-syscalls.c

index 3399c9b07de90dcc39cc0a28fe69f0fdb4079eea..97a12c4835a896e0a0e050c98d5aa5cd0e25af5a 100644 (file)
@@ -27,6 +27,7 @@
 #include <wrapper/rcu.h>
 #include <wrapper/syscall.h>
 #include <lttng-events.h>
+#include <lttng-kernel-version.h>
 
 #ifndef CONFIG_COMPAT
 # ifndef is_compat_task
 
 /* 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 {
This page took 0.026345 seconds and 4 git commands to generate.