Index: apertium/apertium_filter_ambiguity.cc
--- apertium/apertium_filter_ambiguity.cc.orig
+++ apertium/apertium_filter_ambiguity.cc
@@ -29,6 +29,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <libgen.h>
+#include <unistd.h>
 #ifdef _MSC_VER
 #include <io.h>
 #include <fcntl.h>
@@ -39,6 +40,12 @@ using namespace std;
 
 int main(int argc, char *argv[])
 {
+  if(pledge("stdio rpath wpath cpath", NULL) == -1)
+  {
+    wcerr << "pledge" << endl;
+    exit(EXIT_FAILURE);
+  }
+
   LtLocale::tryToSetLocale();
 
   if(argc < 2 || argc > 4)
