include: net: socketutils: Allow to build for CONFIG_POSIX_API

Previously, they were tested only with CONFIG_NET_SOCKETS_POSIX_NAMES,
but should also work with POSIX subsys. Achieve this by including POSIX
headers in this case.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
This commit is contained in:
Paul Sokolovsky 2019-09-05 17:43:45 +03:00 committed by Jukka Rissanen
commit 7c49ac6e0a
2 changed files with 8 additions and 5 deletions

View file

@ -4,6 +4,12 @@
* SPDX-License-Identifier: Apache-2.0
*/
#ifdef CONFIG_NET_SOCKETS_POSIX_NAMES
#include <net/socket.h>
#else
#include <posix/netdb.h>
#endif
/**
* @brief Find port in addr:port string.
*