net: sntp: Allow to build for CONFIG_POSIX_API.

Use POSIX headers in this case.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
This commit is contained in:
Paul Sokolovsky 2019-09-12 13:33:04 +03:00 committed by Jukka Rissanen
commit a7bb2850f7

View file

@ -8,7 +8,13 @@
#ifndef ZEPHYR_INCLUDE_NET_SNTP_H_ #ifndef ZEPHYR_INCLUDE_NET_SNTP_H_
#define ZEPHYR_INCLUDE_NET_SNTP_H_ #define ZEPHYR_INCLUDE_NET_SNTP_H_
#ifdef CONFIG_NET_SOCKETS_POSIX_NAMES
#include <net/socket.h> #include <net/socket.h>
#else
#include <posix/sys/socket.h>
#include <posix/unistd.h>
#include <posix/poll.h>
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {