Skip to content

Commit f6d3f48

Browse files
committed
posix: remove zephyr/posix in header prefixes
If C libraries provide conformant POSIX headers, then use the headers provided by the C library. Otherwise, C library maintainers may add `include/zephyr/posix` to their standard search path. Signed-off-by: Chris Friedt <[email protected]>
1 parent 058a465 commit f6d3f48

File tree

143 files changed

+178
-256
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+178
-256
lines changed

drivers/modem/ublox-sara-r4.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ LOG_MODULE_REGISTER(modem_ublox_sara_r4, CONFIG_MODEM_LOG_LEVEL);
1515
#include <zephyr/drivers/gpio.h>
1616
#include <zephyr/device.h>
1717
#include <zephyr/init.h>
18-
#include <zephyr/posix/fcntl.h>
18+
#include <fcntl.h>
1919

2020
#include <zephyr/net/net_if.h>
2121
#include <zephyr/net/net_offload.h>

drivers/net/nsos_fcntl.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,7 @@
1919
/*
2020
* When building for Zephyr, use Zephyr specific fcntl definitions.
2121
*/
22-
#ifdef __ZEPHYR__
23-
#include <zephyr/posix/fcntl.h>
24-
#else
2522
#include <fcntl.h>
26-
#endif
2723

2824
#include "nsi_errno.h"
2925
#include "nsos_fcntl.h"

drivers/net/nsos_sockets.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ LOG_MODULE_REGISTER(nsos_sockets);
2424
#include <zephyr/net/net_ip.h>
2525
#include <zephyr/net/offloaded_netdev.h>
2626
#include <zephyr/net/socket_offload.h>
27-
#include <zephyr/posix/fcntl.h>
27+
#include <fcntl.h>
2828
#include <zephyr/sys/fdtable.h>
2929
#include <zephyr/sys/dlist.h>
3030

drivers/net/ppp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ LOG_MODULE_REGISTER(net_ppp, LOG_LEVEL);
3131
#include <zephyr/sys/crc.h>
3232
#include <zephyr/drivers/uart.h>
3333
#include <zephyr/random/random.h>
34-
#include <zephyr/posix/net/if_arp.h>
34+
#include <net/if_arp.h>
3535
#include <zephyr/net/ethernet.h>
3636
#include <zephyr/net/capture.h>
3737

drivers/wifi/simplelink/simplelink_sockets.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ LOG_MODULE_DECLARE(LOG_MODULE_NAME);
99

1010
#include <stdlib.h>
1111
#include <limits.h>
12-
#include <zephyr/posix/fcntl.h>
12+
#include <fcntl.h>
1313

1414
#include <zephyr/kernel.h>
1515
/* Define sockaddr, etc, before simplelink.h */

include/zephyr/net/socket.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,19 +1280,19 @@ struct socket_op_vtable {
12801280
*/
12811281
#if defined(CONFIG_POSIX_API)
12821282
#if !defined(ZEPHYR_INCLUDE_POSIX_ARPA_INET_H_)
1283-
#include <zephyr/posix/arpa/inet.h>
1283+
#include <arpa/inet.h>
12841284
#endif
12851285
#if !defined(ZEPHYR_INCLUDE_POSIX_NETDB_H_)
1286-
#include <zephyr/posix/netdb.h>
1286+
#include <netdb.h>
12871287
#endif
12881288
#if !defined(ZEPHYR_INCLUDE_POSIX_UNISTD_H_)
1289-
#include <zephyr/posix/unistd.h>
1289+
#include <unistd.h>
12901290
#endif
12911291
#if !defined(ZEPHYR_INCLUDE_POSIX_POLL_H_)
1292-
#include <zephyr/posix/poll.h>
1292+
#include <poll.h>
12931293
#endif
12941294
#if !defined(ZEPHYR_INCLUDE_POSIX_SYS_SOCKET_H_)
1295-
#include <zephyr/posix/sys/socket.h>
1295+
#include <sys/socket.h>
12961296
#endif
12971297
#endif /* CONFIG_POSIX_API */
12981298

include/zephyr/posix/arpa/inet.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
#include <stddef.h>
1010

11-
#include <zephyr/posix/netinet/in.h>
12-
#include <zephyr/posix/sys/socket.h>
11+
#include <netinet/in.h>
12+
#include <sys/socket.h>
1313

1414
#include <zephyr/net/socket.h>
1515

include/zephyr/posix/dirent.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#ifndef ZEPHYR_INCLUDE_POSIX_DIRENT_H_
99
#define ZEPHYR_INCLUDE_POSIX_DIRENT_H_
1010

11-
#include <zephyr/posix/sys/dirent.h>
11+
#include <sys/dirent.h>
1212
#include <zephyr/toolchain.h>
1313

1414
#ifdef __cplusplus

include/zephyr/posix/grp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
extern "C" {
1111
#endif
1212

13-
#include <zephyr/posix/sys/stat.h>
13+
#include <sys/stat.h>
1414

1515
/**
1616
* @brief Group structure

include/zephyr/posix/mqueue.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
#include <signal.h>
1212

1313
#include <zephyr/kernel.h>
14-
#include <zephyr/posix/fcntl.h>
15-
#include <zephyr/posix/sys/stat.h>
16-
#include <zephyr/posix/posix_types.h>
14+
#include <fcntl.h>
15+
#include <sys/stat.h>
16+
#include <posix_types.h>
1717

1818
#ifdef __cplusplus
1919
extern "C" {

0 commit comments

Comments
 (0)