drivers: wifi: resolve undefined macros when CONFIG_POSIX_API is set

When CONFIG_POSIX_API is set in lieu of CONFIG_NET_SOCKETS_POSIX_NAMES,
some macros such as POLLIN, POLLOUT and MSG_PEEK are undefined, and
the appropriate posix headers need to be included to access those.

Signed-off-by: Vincent Wan <vwan@ti.com>
This commit is contained in:
Vincent Wan 2020-07-24 14:46:15 -07:00 committed by Carles Cufí
parent b3d5af0e9d
commit 5014e7da44

View file

@ -23,6 +23,12 @@ LOG_MODULE_DECLARE(LOG_MODULE_NAME);
#include "sockets_internal.h"
#include "tls_internal.h"
/* Need these for POLLIN, POLLOUT, MSG_PEEK, etc. */
#if defined(CONFIG_POSIX_API)
#include "posix/poll.h"
#include "posix/sys/socket.h"
#endif
#define FAILED (-1)
/* Increment by 1 to make sure we do not store the value of 0, which has