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:
Chris Friedt <cfriedt@meta.com>
Loading
Please sign in to comment