Browse Source

add strdupa macro for compatibility

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Felix Fietkau 1 month ago
parent
commit
e209a4ced1
1 changed files with 4 additions and 0 deletions
  1. 4 0
      uclient-fetch.c

+ 4 - 0
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;