openbsd-ports/textproc/apertium/patches/patch-apertium_apertium_desxlsx_cc
bentley 12ae13df34 Add pledge() calls to apertium tools: "stdio rpath wpath cpath"
These tools both process input files at build time to generate the
apertium language pairs and dictionary files, and at runtime perform
language translation for the user with said language pairs and
dictionaries.
2019-03-05 05:19:31 +00:00

26 lines
619 B
Plaintext

$OpenBSD: patch-apertium_apertium_desxlsx_cc,v 1.1 2019/03/05 05:19:31 bentley Exp $
Index: apertium/apertium_desxlsx.cc
--- apertium/apertium_desxlsx.cc.orig
+++ apertium/apertium_desxlsx.cc
@@ -21,6 +21,7 @@
#include <string.h>
#include <errno.h>
#include <stdlib.h>
+#include <unistd.h>
/* end standard C headers. */
@@ -3322,6 +3323,11 @@ void usage(string const &progname)
int main(int argc, char *argv[])
{
+ if (pledge("stdio rpath wpath cpath", NULL) == -1) {
+ wcerr << "pledge" << endl;
+ exit(EXIT_FAILURE);
+ }
+
LtLocale::tryToSetLocale();
size_t base = 0;
eosIncond = false;