From bcd34f4959206491be82abbf3f7124b03a5deb27 Mon Sep 17 00:00:00 2001 From: default Date: Sun, 5 Jan 2025 14:00:13 +0100 Subject: More sandbox compilation tweaks under Alpine Linux. --- README.md | 2 +- sandbox.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 62bb910..23e7586 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ If it still gives compilation errors (because your system does not implement the make CFLAGS=-DWITHOUT_SHM ``` -If compilation fails on Linux with the message `no landlock on kernels older than...` or complaining about not finding the `linux/landlock.h` header, then your system lacks support for Linux Landlock sandboxing (new in snac v2.68); to disable it, run +If compilation fails on Linux with the message `no landlock on kernels older than...` or complaining about not being able to compile `sandbox.c`, then your system lacks support for Linux Landlock sandboxing (new in snac v2.68); to disable it, run ```sh make CFLAGS=-DWITHOUT_SANDBOX diff --git a/sandbox.c b/sandbox.c index 0d82f58..f6f8d67 100644 --- a/sandbox.c +++ b/sandbox.c @@ -3,11 +3,13 @@ #include "snac.h" #ifdef __linux__ +#ifndef WITHOUT_SANDBOX #include #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 13, 0) #define WITHOUT_SANDBOX #endif +#endif #endif /* __linux__ */ -- cgit v1.2.3