Index: confget_common.c
--- confget_common.c.orig	2019-01-13 12:50:36.000000000 +0100
+++ confget_common.c	2019-04-20 20:10:29.001881000 +0200
@@ -24,6 +24,9 @@
  * SUCH DAMAGE.
  */
 
+#ifdef __FreeBSD__
+#define _WITH_GETLINE
+#endif
 #include <err.h>
 #include <stdbool.h>
 #include <stdio.h>
Index: test-getline.c
--- test-getline.c.orig	2019-01-13 12:50:36.000000000 +0100
+++ test-getline.c	2019-04-20 20:10:21.668734000 +0200
@@ -24,6 +24,9 @@
  * SUCH DAMAGE.
  */
 
+#ifdef __FreeBSD__
+#define _WITH_GETLINE
+#endif
 #include <stdio.h>
 #include <stdlib.h>
 
