openbsd-ports/textproc/apertium/patches/patch-apertium_apertium_postchunk_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

18 lines
471 B
Plaintext

$OpenBSD: patch-apertium_apertium_postchunk_cc,v 1.1 2019/03/05 05:19:32 bentley Exp $
Index: apertium/apertium_postchunk.cc
--- apertium/apertium_postchunk.cc.orig
+++ apertium/apertium_postchunk.cc
@@ -85,6 +85,11 @@ FILE * open_output(string const &filename)
int main(int argc, char *argv[])
{
+ if (pledge("stdio rpath wpath cpath", NULL) == -1) {
+ wcerr << "pledge" << endl;
+ exit(EXIT_FAILURE);
+ }
+
LtLocale::tryToSetLocale();
Postchunk p;