ports/textproc/multimarkdown/patches/patch-src_main_c

28 lines
583 B
Text

Index: src/main.c
--- src/main.c.orig
+++ src/main.c
@@ -54,11 +54,13 @@
*/
#include <ctype.h>
+#include <errno.h>
#include <libgen.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include "argtable3.h"
@@ -213,6 +215,10 @@ int main(int argc, char ** argv) {
goto exit2;
}
+ if (pledge("stdio rpath wpath cpath", NULL) == -1) {
+ fprintf(stderr,"pledge: error #%d\n", errno);
+ exit(EXIT_FAILURE);
+ }
// Parse options
unsigned long extensions = EXT_SMART | EXT_NOTES | EXT_CRITIC | EXT_TRANSCLUDE;