net: sockets: conditionally include zephyr/posix/fcntl.h
Only include `<fcntl.h>` for `CONFIG_ARCH_POSIX`. Otherwise, include `<zephyr/posix/fcntl.h>`. Signed-off-by: Chris Friedt <cfriedt@meta.com>
This commit is contained in:
parent
ab6102f70f
commit
c2a62f4ad7
1 changed files with 5 additions and 3 deletions
|
@ -5,9 +5,6 @@
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* libc headers */
|
|
||||||
#include <fcntl.h>
|
|
||||||
|
|
||||||
/* Zephyr headers */
|
/* Zephyr headers */
|
||||||
#include <zephyr/logging/log.h>
|
#include <zephyr/logging/log.h>
|
||||||
LOG_MODULE_REGISTER(net_sock, CONFIG_NET_SOCKETS_LOG_LEVEL);
|
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 <zephyr/net/net_pkt.h>
|
#include <zephyr/net/net_pkt.h>
|
||||||
#include <zephyr/net/socket.h>
|
#include <zephyr/net/socket.h>
|
||||||
#include <zephyr/net/socket_types.h>
|
#include <zephyr/net/socket_types.h>
|
||||||
|
#ifdef CONFIG_ARCH_POSIX
|
||||||
|
#include <fcntl.h>
|
||||||
|
#else
|
||||||
|
#include <zephyr/posix/fcntl.h>
|
||||||
|
#endif
|
||||||
#include <zephyr/syscall_handler.h>
|
#include <zephyr/syscall_handler.h>
|
||||||
#include <zephyr/sys/fdtable.h>
|
#include <zephyr/sys/fdtable.h>
|
||||||
#include <zephyr/sys/math_extras.h>
|
#include <zephyr/sys/math_extras.h>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue