Not all environments need or can work with SO_REUSE enabled, so making this option configurable.
Specify the thread-local-storage-pointer index for lwip
use.
+config LWIP_SO_REUSE
+ bool "Enable SO_REUSEADDR option"
+ default 0
+ help
+ Enabling this option allows to bind to a port which remains in
+ TIME_WAIT.
+
endmenu
#include <stdlib.h>
#include "esp_task.h"
+#include "sdkconfig.h"
/* Enable all Espressif-only options */
#define LWIP_ESP8266
/**
* SO_REUSE==1: Enable SO_REUSEADDR option.
+ * This option is set via menuconfig.
*/
-#define SO_REUSE 1
+#define SO_REUSE CONFIG_LWIP_SO_REUSE
/*
----------------------------------------