Skip to content

FreeRTOS/lwIP IPv6-only: LWS compile breaks because sockaddr_in is required even when LWIP_IPV4=0 #3642

Description

@aksilicon

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions