From fccd8d1a5b21047b5075307bbc1d547991187874 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Rohl=C3=ADnek?= Date: Wed, 23 Apr 2025 08:36:43 +0200 Subject: [PATCH] feat(network/lwip): Add checks for maximum socket count --- components/lwip/port/esp32xx/vfs_lwip.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/lwip/port/esp32xx/vfs_lwip.c b/components/lwip/port/esp32xx/vfs_lwip.c index e9fa7a7ec9..1bdb59d295 100644 --- a/components/lwip/port/esp32xx/vfs_lwip.c +++ b/components/lwip/port/esp32xx/vfs_lwip.c @@ -10,6 +10,7 @@ #include #include #include +#include #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