ports/textproc/apertium/patches/patch-apertium_apertium_pretransfer_cc

24 lines
558 B
Text

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;