SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
28
textproc/mupdf/patches/patch-source_tools_pdfpages_c
Normal file
28
textproc/mupdf/patches/patch-source_tools_pdfpages_c
Normal file
|
@ -0,0 +1,28 @@
|
|||
add pledge(2) to "mutool pages"
|
||||
|
||||
Index: source/tools/pdfpages.c
|
||||
--- source/tools/pdfpages.c.orig
|
||||
+++ source/tools/pdfpages.c
|
||||
@@ -28,6 +28,9 @@
|
||||
#include "mupdf/fitz.h"
|
||||
#include "mupdf/pdf.h"
|
||||
|
||||
+#include <unistd.h>
|
||||
+#include <errno.h>
|
||||
+#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -212,6 +215,12 @@ int pdfpages_main(int argc, char **argv)
|
||||
|
||||
if (fz_optind == argc)
|
||||
return infousage();
|
||||
+
|
||||
+ if (pledge("stdio rpath", NULL) == -1)
|
||||
+ {
|
||||
+ fprintf(stderr, "pledge: %s\n", strerror(errno));
|
||||
+ exit(1);
|
||||
+ }
|
||||
|
||||
ctx = fz_new_context(NULL, NULL, FZ_STORE_UNLIMITED);
|
||||
if (!ctx)
|
Loading…
Add table
Add a link
Reference in a new issue