From e48fe540bee9a58abb6a8620e1c38d57b6684f40 Mon Sep 17 00:00:00 2001 From: Francesco Giancane Date: Thu, 9 Jan 2020 16:37:14 +0100 Subject: [PATCH] include/sys/socket.h: ensure SOMAXCONN symbol is defined SOMAXCONN is expected to be defined in this header, but for the esp32 port is found in net/if.h from newlib. Avoid the issue by including the net/if.h header in sys/socket.h so that compatibility is preserved. Signed-off-by: Francesco Giancane Merges https://github.com/espressif/esp-idf/pull/4637 --- components/lwip/port/esp32/include/sys/socket.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/lwip/port/esp32/include/sys/socket.h b/components/lwip/port/esp32/include/sys/socket.h index 0ed9baf3d9..5ea4db4ab8 100644 --- a/components/lwip/port/esp32/include/sys/socket.h +++ b/components/lwip/port/esp32/include/sys/socket.h @@ -31,3 +31,8 @@ */ #include "lwip/sockets.h" +/* + SOMAXCONN is expected to be found in this header too, + while for ESP32 port is defined in net/if.h +*/ +#include