1
0
mirror of https://github.com/bgp/bgpq4.git synced 2024-05-11 05:55:05 +00:00

use pledge() if available

This commit is contained in:
Stuart Henderson
2019-12-30 16:54:44 +00:00
committed by GitHub
parent 92249a3e6a
commit e5df35884c

View File

@ -142,6 +142,13 @@ main(int argc, char* argv[])
int widthSet=0, aggregate=0, refine=0, refineLow=0;
unsigned long maxlen=0;
#ifdef HAVE_PLEDGE
if (pledge("stdio inet dns", NULL) == -1) {
sx_report(SX_ERROR, "pledge() failed");
exit(1);
}
#endif
bgpq_expander_init(&expander,af);
if (getenv("IRRD_SOURCES"))
expander.sources=getenv("IRRD_SOURCES");