ports/textproc/apertium/patches/patch-apertium_apertium_tmxbuild_cc

24 lines
594 B
Text
Raw Normal View History

2023-08-16 22:26:55 +00:00
Index: apertium/apertium_tmxbuild.cc
--- apertium/apertium_tmxbuild.cc.orig
+++ apertium/apertium_tmxbuild.cc
@@ -21,6 +21,7 @@
#include <string>
#include <cstdio>
#include <lttoolbox/lt_locale.h>
+#include <unistd.h>
#include <apertium/apertium_config.h>
#include <apertium/tmx_builder.h>
@@ -61,6 +62,11 @@ 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();
string output_file = "";
string doc1 = "", doc2 = "";