$OpenBSD: patch-platform_x11_jstest_main_c,v 1.3 2018/04/23 11:55:54 sthen Exp $

add pledge(2) to mujstest
  - rpath : OPEN command
  - wpath cpath : SCREENSHOT command

Index: platform/x11/jstest_main.c
--- platform/x11/jstest_main.c.orig
+++ platform/x11/jstest_main.c
@@ -1,5 +1,7 @@
 #include "pdfapp.h"
 
+#include <unistd.h>
+#include <errno.h>
 #include <string.h>
 #include <ctype.h>
 #include <stdlib.h>
@@ -311,6 +313,12 @@ main(int argc, char *argv[])
 
 	if (fz_optind == argc)
 		usage();
+
+	if (pledge("stdio rpath wpath cpath", NULL) == -1)
+	{
+		fprintf(stderr, "pledge: %s\n", strerror(errno));
+		exit(1);
+	}
 
 	ctx = fz_new_context(NULL, NULL, FZ_STORE_DEFAULT);
 	if (!ctx)
