mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
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:
parent
239615f5ae
commit
bd259a7eb6
1 changed files with 2 additions and 4 deletions
|
|
@ -29,7 +29,7 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "config.h"
|
#include <string.h>
|
||||||
|
|
||||||
#include <spa/utils/defs.h>
|
#include <spa/utils/defs.h>
|
||||||
#include <spa/pod/pod.h>
|
#include <spa/pod/pod.h>
|
||||||
|
|
@ -54,9 +54,7 @@ pw_free_strv(char **str);
|
||||||
char *
|
char *
|
||||||
pw_strip(char *str, const char *whitespace);
|
pw_strip(char *str, const char *whitespace);
|
||||||
|
|
||||||
#if defined(HAVE_STRNDUPA)
|
#if !defined(strndupa)
|
||||||
#include <string.h>
|
|
||||||
#elif !defined(strndupa)
|
|
||||||
# define strndupa(s, n) \
|
# define strndupa(s, n) \
|
||||||
({ \
|
({ \
|
||||||
const char *__old = (s); \
|
const char *__old = (s); \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue