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:
parent
3051ba19f0
commit
394d5f7656
|
@ -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.
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue