Skip to content

posix: CONFIG_POSIX_API and CONFIG_NET_SOCKETS_POSIX_NAMES don't make sense to use together, and conflict when doing so #16141

@pfalcon

Description

@pfalcon

As discussed in #16009 .

The meaning of CONFIG_SOCKETS_POSIX_NAMES is "expose Zephyr's namespaced socket API under standard POSIX names".

The meaning of CONFIG_POSIX_API is "expose all POSIX APIs which are available in Zephyr".

From this description, it's clear that these 2 options shouldn't be used together, as CONFIG_POSIX_API has wider scope which subsumes and supersedes meaning of CONFIG_SOCKETS_POSIX_NAMES.

However, implementation-wise, these 2 options are implemented differently, so if someone by mistake enabled them, that can lead to compile-time errors (whose reason may be not immediately clear.

Consequently, we should:

  • Either make these 2 options conflict, with explicit error message describing the above, or
  • Make CONFIG_POSIX_API silently subsume CONFIG_SOCKETS_POSIX_NAMES.

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementChanges/Updates/Additions to existing featuresarea: POSIXPOSIX API Libraryarea: SocketsNetworking sockets

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions