From 87ad3fdc188bdecd650cd6accdd8ea0bfa4c40e0 Mon Sep 17 00:00:00 2001 From: Francis Deslauriers Date: Fri, 7 May 2021 10:48:28 -0400 Subject: [PATCH] Fix: add missing #include for 3.8 kernel MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Add the `linux/compat.h` include to fix the following error while building the modules against a 3.8 kernel for x86-64 kernel: error: ‘F_GETLK64’ undeclared here (not in a function) ctf_enum_value("F_GETLK64", F_GETLK64) Also, move the #include directives from the instrumentation headers to the `lttng-syscalls.h` file. Signed-off-by: Francis Deslauriers Signed-off-by: Mathieu Desnoyers Change-Id: I334a14d0b40ec77e0ca0aa3b762197de2050a1ae --- .../syscalls/headers/syscalls_integers_override.h | 3 --- include/instrumentation/syscalls/headers/syscalls_pointers.h | 3 --- src/lttng-syscalls-enum.c | 2 ++ src/lttng-syscalls.h | 5 +++++ 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/instrumentation/syscalls/headers/syscalls_integers_override.h b/include/instrumentation/syscalls/headers/syscalls_integers_override.h index 4821b9f7..334aea8f 100644 --- a/include/instrumentation/syscalls/headers/syscalls_integers_override.h +++ b/include/instrumentation/syscalls/headers/syscalls_integers_override.h @@ -1,8 +1,5 @@ /* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only) */ -#include -#include - #ifndef CREATE_SYSCALL_TABLE /* diff --git a/include/instrumentation/syscalls/headers/syscalls_pointers.h b/include/instrumentation/syscalls/headers/syscalls_pointers.h index 0362f5c9..a2ee3127 100644 --- a/include/instrumentation/syscalls/headers/syscalls_pointers.h +++ b/include/instrumentation/syscalls/headers/syscalls_pointers.h @@ -1,8 +1,5 @@ /* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only) */ -#include -#include - #ifdef CONFIG_X86_64 #include "x86-64-syscalls_pointers.h" #endif diff --git a/src/lttng-syscalls-enum.c b/src/lttng-syscalls-enum.c index 1bb60b13..b82dbfd1 100644 --- a/src/lttng-syscalls-enum.c +++ b/src/lttng-syscalls-enum.c @@ -10,6 +10,8 @@ #include +#include "lttng-syscalls.h" + #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS #define TP_MODULE_NOINIT diff --git a/src/lttng-syscalls.h b/src/lttng-syscalls.h index 01416f4f..7cbdd0ff 100644 --- a/src/lttng-syscalls.h +++ b/src/lttng-syscalls.h @@ -13,6 +13,11 @@ #include #include +#include +#include +#include +#include +#include #include #include -- 2.34.1