From 101cc1a67272a4bb25daf78368573fdcb1dba307 Mon Sep 17 00:00:00 2001 From: cpq Date: Sat, 20 Aug 2022 00:02:36 +0100 Subject: [PATCH] Add define for strdup --- src/arch_freertos_lwip.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/arch_freertos_lwip.h b/src/arch_freertos_lwip.h index 61555ab1..840855d9 100644 --- a/src/arch_freertos_lwip.h +++ b/src/arch_freertos_lwip.h @@ -39,6 +39,7 @@ static inline void *mg_calloc(int cnt, size_t size) { #define calloc(a, b) mg_calloc((a), (b)) #define free(a) vPortFree(a) #define malloc(a) pvPortMalloc(a) +#define strdup(s) ((char *) mg_strdup(mg_str(s)).ptr) #define mkdir(a, b) (-1) #ifndef MG_IO_SIZE