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 <francesco.giancane@accenture.com>

Merges https://github.com/espressif/esp-idf/pull/4637
This commit is contained in:
Francesco Giancane
2020-01-09 16:37:14 +01:00
committed by Angus Gratton
parent 64377b54d1
commit e48fe540be

View File

@@ -31,3 +31,8 @@
*/ */
#include "lwip/sockets.h" #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 <net/if.h>