mgmt: smp: Allow building with POSIX API in UDP transport

If the POSIX API is selected via the POSIX_API option, don't also select
the conflicting NET_SOCKETS_POSIX_NAMES and use the POSIX headers instead.

Signed-off-by: Berend Ozceri <berend@recogni.com>
This commit is contained in:
Berend Ozceri 2022-05-31 11:56:47 -07:00 committed by Fabio Baltieri
parent 3051ba19f0
commit 394d5f7656
2 changed files with 6 additions and 1 deletions

View File

@ -303,7 +303,7 @@ menuconfig MCUMGR_SMP_UDP
select NETWORKING
select NET_UDP
select NET_SOCKETS
select NET_SOCKETS_POSIX_NAMES
select NET_SOCKETS_POSIX_NAMES if !POSIX_API
help
Enables handling of SMP commands received over UDP.
Will start a thread for listening on the configured UDP port.

View File

@ -11,7 +11,12 @@
#include <zephyr/zephyr.h>
#include <zephyr/init.h>
#if defined(CONFIG_POSIX_API)
#include <zephyr/posix/unistd.h>
#include <zephyr/posix/sys/socket.h>
#else
#include <zephyr/net/socket.h>
#endif
#include <errno.h>
#include <mgmt/mgmt.h>
#include <zephyr/mgmt/mcumgr/smp_udp.h>