Fix: add missing #include for 3.8 kernel
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Fri, 7 May 2021 14:48:28 +0000 (10:48 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 7 May 2021 15:58:37 +0000 (11:58 -0400)
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 <francis.deslauriers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I334a14d0b40ec77e0ca0aa3b762197de2050a1ae

include/instrumentation/syscalls/headers/syscalls_integers_override.h
include/instrumentation/syscalls/headers/syscalls_pointers.h
src/lttng-syscalls-enum.c
src/lttng-syscalls.h

index 4821b9f71508a3cea5dc5d2acbb91bb961a094bc..334aea8f48369387c4d446878194d77378514772 100644 (file)
@@ -1,8 +1,5 @@
 /* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only) */
 
-#include <linux/fcntl.h>
-#include <linux/mman.h>
-
 #ifndef CREATE_SYSCALL_TABLE
 
 /*
index 0362f5c9101bbcf27d9e9b9023d1e520aac2968d..a2ee31275732706afde4cbb9acd104d68f63ac26 100644 (file)
@@ -1,8 +1,5 @@
 /* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only) */
 
-#include <linux/in.h>
-#include <linux/in6.h>
-
 #ifdef CONFIG_X86_64
 #include "x86-64-syscalls_pointers.h"
 #endif
index 1bb60b131c26adb57b4f75dcb301be098c110cf4..b82dbfd11da2db1b2c4c56768cd43a75b6023a05 100644 (file)
@@ -10,6 +10,8 @@
 
 #include <lttng/events.h>
 
+#include "lttng-syscalls.h"
+
 #define LTTNG_PACKAGE_BUILD
 #define CREATE_TRACE_POINTS
 #define TP_MODULE_NOINIT
index 01416f4fa01a44f52a7ea2f56f70babbaa8cd25e..7cbdd0ffeeac00c85aa431c1b1efa9e8a36c29b9 100644 (file)
 #include <stddef.h>
 
 #include <asm/ptrace.h>
+#include <linux/compat.h>
+#include <linux/fcntl.h>
+#include <linux/in.h>
+#include <linux/in6.h>
+#include <linux/mman.h>
 
 #include <lttng/events.h>
 #include <lttng/kernel-version.h>
This page took 0.028219 seconds and 4 git commands to generate.