]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
start: Only include linux/landlock.h when landlock is enabled 4592/head
authorStéphane Graber <stgraber@stgraber.org>
Wed, 15 Oct 2025 00:28:03 +0000 (20:28 -0400)
committerStéphane Graber <stgraber@stgraber.org>
Wed, 15 Oct 2025 00:28:09 +0000 (20:28 -0400)
Closes #4591

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
src/lxc/start.c

index b8559bbebf3963413e289119587d5217ed57930d..9311d61452a80e32e3b0dc5bc6f4b062596e1dca 100644 (file)
@@ -6,7 +6,6 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <grp.h>
-#include <linux/landlock.h>
 #include <poll.h>
 #include <pthread.h>
 #include <signal.h>
@@ -69,6 +68,8 @@
 #endif
 
 #if HAVE_LANDLOCK_MONITOR
+#include <linux/landlock.h>
+
 #ifndef landlock_create_ruleset
 static inline int
 landlock_create_ruleset(const struct landlock_ruleset_attr *const attr,