add strdupa macro for compatibility
authorFelix Fietkau <nbd@nbd.name>
Tue, 26 Mar 2024 19:10:02 +0000 (20:10 +0100)
committerFelix Fietkau <nbd@nbd.name>
Tue, 26 Mar 2024 19:10:02 +0000 (20:10 +0100)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
uclient-fetch.c

index 282092e2f556a54c9a74366840231c57450c1428..1e51ff3e8e46cecdc98f3341e24ba09065baf193 100644 (file)
 #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;