In our local tree we have this change to work around the fact that FreeBSD doesn't provide a getline() prototype unless _WITH_GETLINE is defined before stdio.h is included. It would be nice if some variant of this could make it in to mandoc. Thanks, Brooks commit f1e1737d27fe77dc6f7709aee31911e30684d653 Author: Robert N. M. Watson Date: Wed Aug 16 22:58:19 2017 +0100 getline(3) now requires defining _WITH_GETLINE before including stdio.h. Otherwise, getline() comes without function prototypes, which is not OK on CHERI. (Upstreaming candidate.) diff --git a/contrib/mdocml/mandocdb.c b/contrib/mdocml/mandocdb.c index b9e4fb1c813..4f064d88fde 100644 --- a/contrib/mdocml/mandocdb.c +++ b/contrib/mdocml/mandocdb.c @@ -40,6 +40,7 @@ #endif #include #include +#define _WITH_GETLINE #include #include #include