Skip to content
Commit 24cfb897 authored by Christopher Friedt's avatar Christopher Friedt Committed by Martí Bolívar
Browse files

posix: avoid redefinition errors in network and posix headers



The networking subsystem defines a rather large amount of POSIX
prototypes. However, it's done in a somewhat subversive way via

```
CONFIG_NET_SOCKETS_POSIX_NAMES
```

This option should be removed (or moved to POSIX) and the
networking implementations should be properly namespaced.

With that, the POSIX interface for network-related functions
can simply be a thin wrapper around the z-namespaced variants,
where applicable, or proper POSIX functions should actually
be moved to `lib/posix`.

This will also require a better solution to testing network
functionality on `native_posix` though. The ability to run
those tests and the supposed incompatibility between
`CONFIG_ARCH_POSIX` and `CONFIG_POSIX_API` was the main
motivation for adding `CONFIG_NET_SOCKETS_POSIX_NAMES`.

Eventually, with proper namespacing, these preprocessor
guards against redefining the same symbols can be
removed.

Signed-off-by: default avatarChris Friedt <cfriedt@meta.com>
parent b824039e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment