From c2a62f4ad78000b7d463dfa3e2a7cfa10c67a04d Mon Sep 17 00:00:00 2001 From: Chris Friedt Date: Tue, 10 Jan 2023 21:54:22 -0500 Subject: [PATCH] net: sockets: conditionally include zephyr/posix/fcntl.h Only include `` for `CONFIG_ARCH_POSIX`. Otherwise, include ``. Signed-off-by: Chris Friedt --- subsys/net/lib/sockets/sockets.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/subsys/net/lib/sockets/sockets.c b/subsys/net/lib/sockets/sockets.c index 2763b383a1e..b72c0751b3c 100644 --- a/subsys/net/lib/sockets/sockets.c +++ b/subsys/net/lib/sockets/sockets.c @@ -5,9 +5,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -/* libc headers */ -#include - /* Zephyr headers */ #include LOG_MODULE_REGISTER(net_sock, CONFIG_NET_SOCKETS_LOG_LEVEL); @@ -17,6 +14,11 @@ LOG_MODULE_REGISTER(net_sock, CONFIG_NET_SOCKETS_LOG_LEVEL); #include #include #include +#ifdef CONFIG_ARCH_POSIX +#include +#else +#include +#endif #include #include #include