Skip to content

Commit fccd8d1

Browse files
committed
feat(network/lwip): Add checks for maximum socket count
1 parent bfca55b commit fccd8d1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

components/lwip/port/esp32xx/vfs_lwip.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <sys/errno.h>
1111
#include <sys/lock.h>
1212
#include <sys/fcntl.h>
13+
#include <sys/select.h>
1314
#include "esp_attr.h"
1415
#include "esp_vfs.h"
1516
#include "sdkconfig.h"
@@ -21,6 +22,8 @@
2122
#endif
2223

2324
_Static_assert(MAX_FDS >= CONFIG_LWIP_MAX_SOCKETS, "MAX_FDS < CONFIG_LWIP_MAX_SOCKETS");
25+
_Static_assert(FD_SETSIZE >= CONFIG_LWIP_MAX_SOCKETS, "FD_SETSIZE < CONFIG_LWIP_MAX_SOCKETS");
26+
_Static_assert(LWIP_SOCKET_OFFSET >= 6, "Not enough room for esp_vfs_console (LWIP_SOCKET_OFFSET < 6)");
2427

2528
#ifdef CONFIG_VFS_SUPPORT_SELECT
2629

0 commit comments

Comments
 (0)