diff --git a/mongoose.h b/mongoose.h index e6a5ce6e..359e5261 100644 --- a/mongoose.h +++ b/mongoose.h @@ -580,7 +580,9 @@ int sscanf(const char *, const char *, ...); #define sockaddr_in freertos_sockaddr #define sockaddr freertos_sockaddr +#if ipFR_TCP_VERSION_MAJOR >= 4 #define sin_addr sin_address.ulIP_IPv4 +#endif #define accept(a, b, c) FreeRTOS_accept((a), (b), (c)) #define connect(a, b, c) FreeRTOS_connect((a), (b), (c)) #define bind(a, b, c) FreeRTOS_bind((a), (b), (c)) diff --git a/src/net_ft.h b/src/net_ft.h index d00c3b9a..8d0767b2 100644 --- a/src/net_ft.h +++ b/src/net_ft.h @@ -38,7 +38,9 @@ #define sockaddr_in freertos_sockaddr #define sockaddr freertos_sockaddr +#if ipFR_TCP_VERSION_MAJOR >= 4 #define sin_addr sin_address.ulIP_IPv4 +#endif #define accept(a, b, c) FreeRTOS_accept((a), (b), (c)) #define connect(a, b, c) FreeRTOS_connect((a), (b), (c)) #define bind(a, b, c) FreeRTOS_bind((a), (b), (c))