From 2343ceafc58f93ccb02dbe48192230879f47c72f Mon Sep 17 00:00:00 2001 From: sulincix Date: Wed, 16 Oct 2024 20:24:50 +0000 Subject: [PATCH] fix strdup on musl libc --- src/ccode/fetcher_curl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ccode/fetcher_curl.c b/src/ccode/fetcher_curl.c index c4739ec..19cb1e4 100755 --- a/src/ccode/fetcher_curl.c +++ b/src/ccode/fetcher_curl.c @@ -9,6 +9,10 @@ #include +#ifdef __STRICT_ANSI__ +#define strdup(A) strcpy(calloc(strlen(A) + 1, sizeof(char)), A) +#endif + #ifndef PATH_MAX #define PATH_MAX 1024 #endif