From 5014e7da44cb078e71f7ffc57ee4a35c6fdd59c8 Mon Sep 17 00:00:00 2001 From: Vincent Wan Date: Fri, 24 Jul 2020 14:46:15 -0700 Subject: [PATCH] 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 --- drivers/wifi/simplelink/simplelink_sockets.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/wifi/simplelink/simplelink_sockets.c b/drivers/wifi/simplelink/simplelink_sockets.c index 7b4451c9354..fc3e5ad6539 100644 --- a/drivers/wifi/simplelink/simplelink_sockets.c +++ b/drivers/wifi/simplelink/simplelink_sockets.c @@ -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