From 2536865c4dbf73c9dd009b718d0c0d5d4136cbb8 Mon Sep 17 00:00:00 2001 From: Sergey Lyubka Date: Wed, 29 Jun 2022 19:39:36 +0100 Subject: [PATCH] Fix freertos-tcp build --- mongoose.h | 1 + src/arch_freertos_tcp.h | 1 + 2 files changed, 2 insertions(+) diff --git a/mongoose.h b/mongoose.h index 72bb82f6..a0759dad 100644 --- a/mongoose.h +++ b/mongoose.h @@ -258,6 +258,7 @@ static inline void *mg_calloc(int cnt, size_t size) { #define closesocket(x) FreeRTOS_closesocket(x) #define gethostbyname(x) FreeRTOS_gethostbyname(x) #define getsockname(a, b, c) (-1) +#define getpeername(a, b, c) 0 // Re-route calloc/free to the FreeRTOS's functions, don't use stdlib static inline void *mg_calloc(int cnt, size_t size) { diff --git a/src/arch_freertos_tcp.h b/src/arch_freertos_tcp.h index 797f66c7..d4af7006 100644 --- a/src/arch_freertos_tcp.h +++ b/src/arch_freertos_tcp.h @@ -46,6 +46,7 @@ #define closesocket(x) FreeRTOS_closesocket(x) #define gethostbyname(x) FreeRTOS_gethostbyname(x) #define getsockname(a, b, c) (-1) +#define getpeername(a, b, c) 0 // Re-route calloc/free to the FreeRTOS's functions, don't use stdlib static inline void *mg_calloc(int cnt, size_t size) {