Index: src/gfx/main.cpp
--- src/gfx/main.cpp.orig
+++ src/gfx/main.cpp
@@ -12,6 +12,7 @@
 #include <string.h>
 #include <string>
 #include <string_view>
+#include <unistd.h>
 #include <vector>
 
 #include "cli.hpp"
@@ -639,6 +640,11 @@ static void replaceExtension(std::string &path, char c
 }
 
 int main(int argc, char *argv[]) {
+	if (pledge("stdio rpath wpath cpath", NULL) == -1) {
+		fputs("pledge", stderr);
+		return 1;
+	}
+
 	cli_ParseArgs(argc, argv, optstring, longopts, parseArg, usage);
 
 	if (options.nbColorsPerPal == 0) {
