$OpenBSD: patch-src_asm_main_c,v 1.2 2018/05/15 07:28:15 bentley Exp $

Index: src/asm/main.c
--- src/asm/main.c.orig
+++ src/asm/main.c
@@ -27,6 +27,8 @@
 #include "helpers.h"
 #include "version.h"
 
+int pledge(const char *, const char *);
+
 extern int yyparse(void);
 
 size_t cldefines_index;
@@ -309,6 +311,9 @@ int main(int argc, char *argv[])
 	cldefines = malloc(cldefines_bufsize);
 	if (!cldefines)
 		fatalerror("No memory for command line defines");
+
+	if (pledge("stdio rpath wpath cpath", NULL) == -1)
+		fatalerror("pledge");
 
 	if (argc == 1)
 		print_usage();
