When building libwebsockets for FreeRTOS + lwIP in IPv6-only mode (LWIP_IPV6=1, LWIP_IPV4=0) with LWS_WITH_IPV6=1, compilation fails because LWS code unconditionally depends on struct sockaddr_in and other IPv4-oriented symbols/types that lwIP omits when IPv4 is disabled. This appears to be a portability bug / assumption mismatch: compile-time IPv4 type dependency is enforced even for IPv6-only runtime use.
Environment:
Platform: FreeRTOS + lwIP
Toolchain: ARM GCC (embedded)
LWS: LWS_WITH_IPV6=1
lwIP: LWIP_IPV6=1, LWIP_IPV4=0
Observed Errors (examples):
include/libwebsockets/lws-adopt.h: field 'sa4' has incomplete type
lib/core/private-lib-core.h: field 'frt_pipe_si' has incomplete type
Impact: Prevents strict IPv6-only embedded builds and forces enabling IPv4 purely for compile-time type availability, even when application traffic is IPv6-only.
When building libwebsockets for FreeRTOS + lwIP in IPv6-only mode (LWIP_IPV6=1, LWIP_IPV4=0) with LWS_WITH_IPV6=1, compilation fails because LWS code unconditionally depends on struct sockaddr_in and other IPv4-oriented symbols/types that lwIP omits when IPv4 is disabled. This appears to be a portability bug / assumption mismatch: compile-time IPv4 type dependency is enforced even for IPv6-only runtime use.
Environment:
Platform: FreeRTOS + lwIP
Toolchain: ARM GCC (embedded)
LWS: LWS_WITH_IPV6=1
lwIP: LWIP_IPV6=1, LWIP_IPV4=0
Observed Errors (examples):
include/libwebsockets/lws-adopt.h: field 'sa4' has incomplete type
lib/core/private-lib-core.h: field 'frt_pipe_si' has incomplete type
Impact: Prevents strict IPv6-only embedded builds and forces enabling IPv4 purely for compile-time type availability, even when application traffic is IPv6-only.