$OpenBSD: patch-apertium_apertium_pretransfer_cc,v 1.1 2021/11/15 04:23:36 bentley Exp $

Index: apertium/apertium_pretransfer.cc
--- apertium/apertium_pretransfer.cc.orig
+++ apertium/apertium_pretransfer.cc
@@ -20,6 +20,7 @@
 #include <libgen.h>
 #include <string>
 #include "getopt_long.h"
+#include <unistd.h>
 
 #ifdef _MSC_VER
 #include <io.h>
@@ -43,6 +44,12 @@ void usage(char *progname)
 
 int main(int argc, char *argv[])
 {
+  if (pledge("stdio rpath wpath cpath", NULL) == -1)
+  {
+    wcerr << L"pledge" << endl;
+    exit(EXIT_FAILURE);
+  }
+
   LtLocale::tryToSetLocale();
   bool compound_sep = false;
   bool null_flush = false;
