Index: apertium/apertium_posttransfer.cc
--- apertium/apertium_posttransfer.cc.orig
+++ apertium/apertium_posttransfer.cc
@@ -20,6 +20,7 @@
 #include <libgen.h>
 #include <string>
 #include "getopt_long.h"
+#include <unistd.h>
 
 #ifdef _MSC_VER
 #include <io.h>
@@ -62,6 +63,12 @@ void processStream(InputFile& in, UFILE* out, bool nul
 
 int main(int argc, char *argv[])
 {
+  if (pledge("stdio rpath wpath cpath", NULL) == -1)
+  {
+    wcerr << "pledge" << endl;
+    exit(EXIT_FAILURE);
+  }
+
   LtLocale::tryToSetLocale();
   bool null_flush = false;
 
