From e209a4ced1d80e8a4ac4290a6ade9d339eab1705 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 26 Mar 2024 20:10:02 +0100 Subject: [PATCH] add strdupa macro for compatibility Signed-off-by: Felix Fietkau --- uclient-fetch.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/uclient-fetch.c b/uclient-fetch.c index 282092e..1e51ff3 100644 --- a/uclient-fetch.c +++ b/uclient-fetch.c @@ -41,6 +41,10 @@ #define LIB_EXT "so" #endif +#ifndef strdupa +#define strdupa(x) strcpy(alloca(strlen(x)+1),x) +#endif + static const char *user_agent = "uclient-fetch"; static const char *post_data; static const char *post_file; -- 2.30.2