utils: check for strndupa defined

The meson check does not completely work in detecting strndupa so do
an extra check before we define it.
This commit is contained in:
Wim Taymans 2020-11-09 12:20:40 +01:00
parent 2ae840bc12
commit 779579b349

View file

@ -56,7 +56,7 @@ pw_strip(char *str, const char *whitespace);
#if defined(HAVE_STRNDUPA) #if defined(HAVE_STRNDUPA)
#include <string.h> #include <string.h>
#else #elif !defined(strndupa)
# define strndupa(s, n) \ # define strndupa(s, n) \
({ \ ({ \
const char *__old = (s); \ const char *__old = (s); \