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

Index: apertium/apertium_rewxml.cc
--- apertium/apertium_rewxml.cc.orig
+++ apertium/apertium_rewxml.cc
@@ -21,6 +21,7 @@
 #include <string.h>
 #include <errno.h>
 #include <stdlib.h>
+#include <unistd.h>
 
 /* end standard C headers. */
 
@@ -1855,6 +1856,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();
 
   if(argc > 3)
