Index: src/gfx/main.c
--- src/gfx/main.c.orig
+++ src/gfx/main.c
@@ -52,6 +52,8 @@ static struct option const longopts[] = {
 	{ NULL,              no_argument,       NULL, 0   }
 };
 
+int pledge(const char *, const char *);
+
 static void print_usage(void)
 {
 	fputs(
@@ -81,6 +83,9 @@ int main(int argc, char *argv[])
 	struct Mapfile tilemap = {0};
 	struct Mapfile attrmap = {0};
 	char *ext;
+
+	if (pledge("stdio rpath wpath cpath", NULL) == -1)
+		errx(1, "pledge");
 
 	opts.tilemapfile = "";
 	opts.attrmapfile = "";
