ports/devel/tradcpp/patches/patch-main_c

23 lines
508 B
Text

Index: main.c
--- main.c.orig
+++ main.c
@@ -30,6 +30,7 @@
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
+#include <unistd.h>
#include <string.h>
#include <errno.h>
@@ -1053,6 +1054,11 @@ main(int argc, char *argv[])
progname = strrchr(argv[0], '/');
progname = progname == NULL ? argv[0] : progname + 1;
complain_init(progname);
+
+ if (pledge("stdio rpath wpath cpath", NULL) == -1) {
+ fprintf(stderr, "%s: pledge: %s", progname, strerror(errno));
+ exit(1);
+ }
init();