diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2020-08-07 20:56:55 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2020-08-07 20:56:55 +0000 |
commit | bd916969316991bf751b102b53c2a26febb13487 (patch) | |
tree | 87b7e2a469c4810843543fc088fbb6da9313fdef | |
parent | 16d4788cef7bb58fdc8820bdd5ecb511933f0d15 (diff) | |
download | mandoc-bd916969316991bf751b102b53c2a26febb13487.tar.gz mandoc-bd916969316991bf751b102b53c2a26febb13487.tar.zst mandoc-bd916969316991bf751b102b53c2a26febb13487.zip |
add a forgotten "#if HAVE_PLEDGE";
patch sent in by <alexander dot gromnitsky at gmail dot com>
who found the problem the hard way on Fedora 32
-rw-r--r-- | main.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.352 2020/07/21 15:10:01 schwarze Exp $ */ +/* $Id: main.c,v 1.353 2020/08/07 20:56:55 schwarze Exp $ */ /* * Copyright (c) 2010-2012, 2014-2020 Ingo Schwarze <schwarze@openbsd.org> * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> @@ -847,6 +847,7 @@ process_onefile(struct mparse *mp, struct manpage *resp, int startdir, outst->use_pager = 0; outst->tag_files = term_tag_init(conf->output.outfilename, conf->output.tagfilename); +#if HAVE_PLEDGE if ((conf->output.outfilename != NULL || conf->output.tagfilename != NULL) && pledge("stdio rpath cpath", NULL) == -1) { @@ -854,6 +855,7 @@ process_onefile(struct mparse *mp, struct manpage *resp, int startdir, "%s", strerror(errno)); exit(mandoc_msg_getrc()); } +#endif } if (outst->had_output && outst->outtype <= OUTT_UTF8) { if (outst->outdata == NULL) |