Index: apertium/reformat.xsl
--- apertium/reformat.xsl.orig
+++ apertium/reformat.xsl
@@ -151,6 +151,12 @@ void usage(string const &amp;progname)
 
 int main(int argc, char *argv[])
 {
+  if (pledge("stdio rpath wpath cpath", NULL) == -1)
+  {
+    wcerr &lt;&lt; "pledge" &lt;&lt; endl;
+    exit(EXIT_SUCCESS);
+  }
+
   LtLocale::tryToSetLocale();
 
   if(argc &gt; 3)
