summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2020-08-07 20:56:55 +0000
committerIngo Schwarze <schwarze@openbsd.org>2020-08-07 20:56:55 +0000
commit6f26336e1989358418dea0298b76c51b63066948 (patch)
treec9e56e0264bc3bb115b6ac7b5686c606d0d7e24e /main.c
parentc1e37572ba6067152750a7c237a80328c4cad0ee (diff)
downloadmandoc-6f26336e1989358418dea0298b76c51b63066948.tar.gz
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
Diffstat (limited to 'main.c')
-rw-r--r--main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/main.c b/main.c
index 0f32a644..12fe6928 100644
--- a/main.c
+++ b/main.c
@@ -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)