$OpenBSD: patch-src_asm_main_c,v 1.4 2020/04/12 04:24:56 bentley Exp $

Index: src/asm/main.c
--- src/asm/main.c.orig
+++ src/asm/main.c
@@ -31,6 +31,8 @@
 #include "helpers.h"
 #include "version.h"
 
+int pledge(const char *, const char *);
+
 extern int yyparse(void);
 
 size_t cldefines_index;
@@ -342,6 +344,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 defined(YYDEBUG) && YYDEBUG
 	yydebug = 1;
