$OpenBSD: patch-apertium_apertium_postlatex_cc,v 1.1 2019/03/05 05:19:32 bentley Exp $

Index: apertium/apertium_postlatex.cc
--- apertium/apertium_postlatex.cc.orig
+++ apertium/apertium_postlatex.cc
@@ -21,6 +21,7 @@
 #include <string.h>
 #include <errno.h>
 #include <stdlib.h>
+#include <unistd.h>
 
 /* end standard C headers. */
 
@@ -4601,6 +4602,11 @@ void usage(string const &progname)
 
 int main(int argc, char *argv[])
 {
+  if (pledge("stdio rpath wpath cpath", NULL) == -1) {
+    wcerr << "pledge" << endl;
+    exit(EXIT_FAILURE);
+  }
+
   LtLocale::tryToSetLocale();
   size_t base = 0;
 
