summaryrefslogtreecommitdiffstats
path: root/src/nspawn
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2023-08-21 18:48:19 +0200
committerLennart Poettering <lennart@poettering.net>2023-08-21 18:50:29 +0200
commite2fc0a72223bf1b4b1e2de9e9aa8169ec93ef8f9 (patch)
tree34ae54440c90a9ee787640f523ab7b2e56aad33f /src/nspawn
parentseccomp: move seccomp_parse_errno_or_action() into common definitions (diff)
downloadsystemd-e2fc0a72223bf1b4b1e2de9e9aa8169ec93ef8f9.tar.xz
systemd-e2fc0a72223bf1b4b1e2de9e9aa8169ec93ef8f9.zip
tree-wide: don't ifdef seccomp-util.h, drop seccomp.h inclusion everywhere
seccomp-util.h doesn't need ifdeffing, hence don't. It has worked since quite a while with HAVE_SECCOMP is off, hence use it everywhere. Also drop explicit seccomp.h inclusion everywhere (which needs HAVE_SECCOMP ifdeffery everywhere). seccomp-util.h includes it anyway, automatically, which we can just rely on, and it deals with HAVE_SECCOMP at one central place.
Diffstat (limited to 'src/nspawn')
-rw-r--r--src/nspawn/nspawn-oci.c5
-rw-r--r--src/nspawn/nspawn-seccomp.c6
-rw-r--r--src/nspawn/nspawn-settings.h5
-rw-r--r--src/nspawn/nspawn.c2
4 files changed, 1 insertions, 17 deletions
diff --git a/src/nspawn/nspawn-oci.c b/src/nspawn/nspawn-oci.c
index a4eda80ea0..5bdfebde78 100644
--- a/src/nspawn/nspawn-oci.c
+++ b/src/nspawn/nspawn-oci.c
@@ -1,9 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <linux/oom.h>
-#if HAVE_SECCOMP
-#include <seccomp.h>
-#endif
#include "bus-util.h"
#include "cap-list.h"
@@ -19,9 +16,7 @@
#include "nspawn-oci.h"
#include "path-util.h"
#include "rlimit-util.h"
-#if HAVE_SECCOMP
#include "seccomp-util.h"
-#endif
#include "stdio-util.h"
#include "string-util.h"
#include "strv.h"
diff --git a/src/nspawn/nspawn-seccomp.c b/src/nspawn/nspawn-seccomp.c
index 5f45f367d0..34a8627848 100644
--- a/src/nspawn/nspawn-seccomp.c
+++ b/src/nspawn/nspawn-seccomp.c
@@ -6,16 +6,10 @@
#include <sys/socket.h>
#include <sys/types.h>
-#if HAVE_SECCOMP
-#include <seccomp.h>
-#endif
-
#include "alloc-util.h"
#include "log.h"
#include "nspawn-seccomp.h"
-#if HAVE_SECCOMP
#include "seccomp-util.h"
-#endif
#include "string-util.h"
#include "strv.h"
diff --git a/src/nspawn/nspawn-settings.h b/src/nspawn/nspawn-settings.h
index 0a3d975364..8edf8a3552 100644
--- a/src/nspawn/nspawn-settings.h
+++ b/src/nspawn/nspawn-settings.h
@@ -4,10 +4,6 @@
#include <sched.h>
#include <stdio.h>
-#if HAVE_SECCOMP
-#include <seccomp.h>
-#endif
-
#include "sd-bus.h"
#include "sd-id128.h"
@@ -18,6 +14,7 @@
#include "missing_resource.h"
#include "nspawn-expose-ports.h"
#include "nspawn-mount.h"
+#include "seccomp-util.h"
#include "time-util.h"
typedef enum StartMode {
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index e614b05c83..d3ae547746 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -96,9 +96,7 @@
#include "resolve-util.h"
#include "rlimit-util.h"
#include "rm-rf.h"
-#if HAVE_SECCOMP
#include "seccomp-util.h"
-#endif
#include "selinux-util.h"
#include "signal-util.h"
#include "socket-util.h"