feat(network/lwip): Add checks for maximum socket count

This commit is contained in:
Tomáš Rohlínek
2025-04-23 08:36:43 +02:00
parent bfca55bd5d
commit fccd8d1a5b

View File

@ -10,6 +10,7 @@
#include <sys/errno.h>
#include <sys/lock.h>
#include <sys/fcntl.h>
#include <sys/select.h>
#include "esp_attr.h"
#include "esp_vfs.h"
#include "sdkconfig.h"
@ -21,6 +22,8 @@
#endif
_Static_assert(MAX_FDS >= CONFIG_LWIP_MAX_SOCKETS, "MAX_FDS < CONFIG_LWIP_MAX_SOCKETS");
_Static_assert(FD_SETSIZE >= CONFIG_LWIP_MAX_SOCKETS, "FD_SETSIZE < CONFIG_LWIP_MAX_SOCKETS");
_Static_assert(LWIP_SOCKET_OFFSET >= 6, "Not enough room for esp_vfs_console (LWIP_SOCKET_OFFSET < 6)");
#ifdef CONFIG_VFS_SUPPORT_SELECT