Skip to content

Commit be892de

Browse files
authored
[posix] add RT_USING_POSIX_SOCKET (#5731)
1 parent f587a55 commit be892de

File tree

4 files changed

+18
-20
lines changed

4 files changed

+18
-20
lines changed

bsp/qemu-vexpress-a9/drivers/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ endif
4646
config BSP_DRV_EMAC
4747
bool "Enable EMAC driver"
4848
select RT_USING_LWIP
49-
select RT_USING_SAL
50-
select SAL_USING_POSIX
49+
select RT_USING_POSIX_FS
50+
select RT_USING_POSIX_SOCKET
5151
default n
5252

5353
config BSP_DRV_AUDIO

bsp/stm32/stm32f407-atk-explorer/board/Kconfig

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,8 @@ menu "Onboard Peripheral Drivers"
8383
default n
8484
select RT_USING_LWIP
8585
select RT_LWIP_USING_HW_CHECKSUM
86-
87-
config BSP_USING_ETH_SAL
88-
bool "Enable Ethernet with SAL"
89-
depends on BSP_USING_ETH
90-
default y
91-
select RT_USING_SAL
92-
select SAL_USING_POSIX
86+
select RT_USING_POSIX_FS
87+
select RT_USING_POSIX_SOCKET
9388

9489
config PHY_USING_LAN8720A
9590
bool

components/libc/posix/Kconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ if RT_USING_POSIX_FS
2626
select RT_USING_POSIX_POLL
2727
default n
2828

29+
config RT_USING_POSIX_SOCKET
30+
bool "Enable BSD Socket I/O <sys/socket.h> <netdb.h>"
31+
select RT_USING_POSIX_SELECT
32+
select RT_USING_SAL
33+
default n
34+
2935
config RT_USING_POSIX_TERMIOS
3036
bool "Enable Terminal I/O <termios.h>"
3137
select RT_USING_POSIX_STDIO

components/net/sal/Kconfig

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,16 @@ if RT_USING_SAL
3535
endif
3636

3737
config SAL_USING_POSIX
38-
bool "Enable BSD socket operated by file system API"
39-
default n
40-
select RT_USING_POSIX_FS
41-
select RT_USING_POSIX_SELECT
38+
bool
39+
depends on DFS_USING_POSIX
40+
default y
4241
help
42+
Enable BSD socket operated by file system API
4343
Let BSD socket operated by file system API, such as read/write and involveed in select/poll POSIX APIs.
4444

45-
if !SAL_USING_POSIX
46-
47-
config SAL_SOCKETS_NUM
48-
int "the maximum number of sockets"
49-
default 16
50-
51-
endif
45+
config SAL_SOCKETS_NUM
46+
int "the maximum number of sockets"
47+
depends on !SAL_USING_POSIX
48+
default 16
5249

5350
endif

0 commit comments

Comments
 (0)