ics2tree: fix pledge without #include <unistd.h> - ics2txt - convert icalendar .ics file to plain text HTML git clone git://bitreich.org/ics2txt git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/ics2txt DIR Log DIR Files DIR Refs DIR Tags DIR README --- DIR commit 249ca0bca49471576785d34c208a78f672d7d245 DIR parent 506b1d5a4c1c6cdd5ad6218b3251853cf21cce37 HTML Author: Josuah Demangeon <me@josuah.net> Date: Sun, 20 Jun 2021 22:02:19 +0200 ics2tree: fix pledge without #include <unistd.h> Diffstat: M ics2tree.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- DIR diff --git a/ics2tree.c b/ics2tree.c @@ -1,3 +1,5 @@ +#include <unistd.h> +#include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -72,7 +74,7 @@ main(int argc, char **argv) IcalParser p = {0}; arg0 = *argv++; - if (pledge("stdio") < 0) + if (pledge("stdio", "") < 0) err(1, "pledge: %s", strerror(errno)); p.fn_field_name = fn_field_name;