From: Michael Jeanson Date: Tue, 14 Dec 2021 19:46:45 +0000 (-0500) Subject: fix: isystem: delete global -isystem compile option (v5.16) X-Git-Tag: v2.13.1~5 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=a029f2a396b6da864697416a9e5f9b98a601356c;p=lttng-modules.git fix: isystem: delete global -isystem compile option (v5.16) See upstream commit : commit 04e85bbf71c9072dcf0ad9a7150495d72461105c Author: Alexey Dobriyan Date: Mon Aug 2 23:43:15 2021 +0300 isystem: delete global -isystem compile option Further isolate kernel from userspace, prevent accidental inclusion of undesireable headers, mainly float.h and stdatomic.h. nds32 keeps -isystem globally due to intrinsics used in entrenched header. -isystem is selectively reenabled for some files, again, for intrinsics. Change-Id: I5bea29687dc2bc15e96eeb13008aefe1acc97b8a Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/include/lttng/msgpack.h b/include/lttng/msgpack.h index a5c03ba6..0c63f1ba 100644 --- a/include/lttng/msgpack.h +++ b/include/lttng/msgpack.h @@ -21,7 +21,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include #ifdef __KERNEL__ #include #else /* __KERNEL__ */ diff --git a/include/lttng/string-utils.h b/include/lttng/string-utils.h index 3e7267e9..8b39bef5 100644 --- a/include/lttng/string-utils.h +++ b/include/lttng/string-utils.h @@ -6,8 +6,6 @@ * Copyright (C) 2017 Philippe Proulx */ -#include - typedef char (*strutils_get_char_at_cb)(size_t, void *); bool strutils_is_star_glob_pattern(const char *pattern); diff --git a/include/lttng/tracer.h b/include/lttng/tracer.h index 9ea44bf2..0afb1559 100644 --- a/include/lttng/tracer.h +++ b/include/lttng/tracer.h @@ -11,7 +11,6 @@ * Copyright (C) 2005-2012 Mathieu Desnoyers */ -#include #include #include #include diff --git a/src/lib/msgpack/msgpack.c b/src/lib/msgpack/msgpack.c index b4d9beec..fbbd96f0 100644 --- a/src/lib/msgpack/msgpack.c +++ b/src/lib/msgpack/msgpack.c @@ -20,7 +20,6 @@ #define _GNU_SOURCE #define _LGPL_SOURCE -#include #define MSGPACK_FIXSTR_ID_MASK 0xA0 #define MSGPACK_FIXMAP_ID_MASK 0x80 diff --git a/src/lttng-events.c b/src/lttng-events.c index 31c11457..e9b56871 100644 --- a/src/lttng-events.c +++ b/src/lttng-events.c @@ -49,6 +49,12 @@ #include #include +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,16,0)) +#include +#else +#include +#endif + #define METADATA_CACHE_DEFAULT_SIZE 4096 static LIST_HEAD(sessions); diff --git a/src/lttng-syscalls.c b/src/lttng-syscalls.c index 202745b8..d74851b7 100644 --- a/src/lttng-syscalls.c +++ b/src/lttng-syscalls.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/src/lttng-syscalls.h b/src/lttng-syscalls.h index 7cbdd0ff..a464e69e 100644 --- a/src/lttng-syscalls.h +++ b/src/lttng-syscalls.h @@ -10,8 +10,6 @@ #ifndef LTTNG_SYSCALLS_H #define LTTNG_SYSCALLS_H -#include - #include #include #include