New comment by timkuijsten on mblaze repository https://github.com/leahneukirchen/mblaze/pull/179#issuecomment-670934343 Comment: Thanks for looking at the PR. > xpledge should be static. Why is including err.h everywhere required? Both fixed now. > Instead of changing _XOPEN_SOURCE, please define _BSD_SOURCE where needed (i.e. in xpledge.h) I've restored the _XOPEN_SOURCE definition in mscan.h and defined _BSD_SOURCE in xpledge.h. I did have to hoist the xpledge.h include in mscan to make sure pledge(3) is defined. This fixes the issue. (I'm not quite sure why the same warning isn't triggered in mpick.c where _XOPEN_SOURCE is also set and unistd.h is included before xpledge.h)