utils: don't include config.h

don't include config.h in public header. Just check if strndupa
is defined and if not, define it.
This commit is contained in:
Wim Taymans 2020-11-11 12:23:24 +01:00
parent 239615f5ae
commit bd259a7eb6

View file

@ -29,7 +29,7 @@
extern "C" {
#endif
#include "config.h"
#include <string.h>
#include <spa/utils/defs.h>
#include <spa/pod/pod.h>
@ -54,9 +54,7 @@ pw_free_strv(char **str);
char *
pw_strip(char *str, const char *whitespace);
#if defined(HAVE_STRNDUPA)
#include <string.h>
#elif !defined(strndupa)
#if !defined(strndupa)
# define strndupa(s, n) \
({ \
const char *__old = (s); \