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

Index: apertium/apertium_tagger_readwords.cc
--- apertium/apertium_tagger_readwords.cc.orig
+++ apertium/apertium_tagger_readwords.cc
@@ -26,6 +26,7 @@
 
 #include <cstdlib>
 #include <apertium/string_utils.h>
+#include <unistd.h>
 
 
 using namespace std;
@@ -85,6 +86,11 @@ void help(char *name) {
 
 
 int main(int argc, char* argv[]) {
+  if (pledge("stdio rpath wpath cpath", NULL) == -1) {
+    wcerr << "pledge" << endl;
+    exit(EXIT_FAILURE);
+  }
+
   string tsxfile="";
   string probfile="";
   int corpus_length=-1;
