Ver Fonte

More sandbox compilation tweaks under Alpine Linux.

default há 3 meses atrás
pai
commit
bcd34f4959
2 ficheiros alterados com 3 adições e 1 exclusões
  1. 1 1
      README.md
  2. 2 0
      sandbox.c

+ 1 - 1
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

+ 2 - 0
sandbox.c

@@ -3,11 +3,13 @@
 #include "snac.h"
 
 #ifdef __linux__
+#ifndef WITHOUT_SANDBOX
 #include <linux/version.h>
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 13, 0)
 #define WITHOUT_SANDBOX
 #endif
+#endif
 #endif /* __linux__ */