From: Francis Deslauriers Date: Fri, 7 May 2021 14:48:28 +0000 (-0400) Subject: Fix: add missing #include for 3.8 kernel X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=87ad3fdc188bdecd650cd6accdd8ea0bfa4c40e0;p=lttng-modules.git Fix: add missing #include for 3.8 kernel 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 --- 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