Skip to content

Commit 354e117

Browse files
jukkarnashif
authored andcommitted
net: socket: Network should not include any Posix header
Removing Posix header inclusion as networking APIs and code should be self contained now. Signed-off-by: Jukka Rissanen <[email protected]>
1 parent 55c49cd commit 354e117

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

include/zephyr/net/socket.h

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,30 +1202,4 @@ struct socket_op_vtable {
12021202
* @}
12031203
*/
12041204

1205-
/* Avoid circular loops with POSIX socket headers.
1206-
* We have these includes here so that we do not need
1207-
* to change the applications that were only including
1208-
* zephyr/net/socket.h header file.
1209-
*
1210-
* Additionally, if non-zephyr-prefixed headers are used here,
1211-
* native_sim pulls in those from the host rather than Zephyr's.
1212-
*/
1213-
#if defined(CONFIG_POSIX_API)
1214-
#if !defined(ZEPHYR_INCLUDE_POSIX_ARPA_INET_H_)
1215-
#include <zephyr/posix/arpa/inet.h>
1216-
#endif
1217-
#if !defined(ZEPHYR_INCLUDE_POSIX_NETDB_H_)
1218-
#include <zephyr/posix/netdb.h>
1219-
#endif
1220-
#if !defined(ZEPHYR_INCLUDE_POSIX_UNISTD_H_)
1221-
#include <zephyr/posix/unistd.h>
1222-
#endif
1223-
#if !defined(ZEPHYR_INCLUDE_POSIX_POLL_H_)
1224-
#include <zephyr/posix/poll.h>
1225-
#endif
1226-
#if !defined(ZEPHYR_INCLUDE_POSIX_SYS_SOCKET_H_)
1227-
#include <zephyr/posix/sys/socket.h>
1228-
#endif
1229-
#endif /* CONFIG_POSIX_API */
1230-
12311205
#endif /* ZEPHYR_INCLUDE_NET_SOCKET_H_ */

0 commit comments

Comments
 (0)