From cf78b7272f9a11d3b4e796a6027105614b4fcb01 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 22 Apr 2019 15:31:07 +0200 Subject: [PATCH] lib/util: musl needs _{GNU,BSD}_SOURCE for strlc{at,py}(). --- lib/util.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/util.c b/lib/util.c index 2864b77a..b0acbc91 100644 --- a/lib/util.c +++ b/lib/util.c @@ -27,6 +27,12 @@ # define _GNU_SOURCE /* for vasprintf(3) */ #endif +#if defined(HAVE_STRLCAT) || defined(HAVE_STRLCPY) +# define _BSD_SOURCE +#endif + +#include "compat.h" + #include #include #include