From 5866f754d0e99eb8151b36f225b9b0f0ea77a76f Mon Sep 17 00:00:00 2001 From: Zhang Jun Hao Date: Mon, 6 Jan 2020 18:01:24 +0800 Subject: [PATCH] fix(esp8266): fix compile failed when CONFIG_ESP8266_WIFI_CONNECT_OPEN_ROUTER_WHEN_PWD_IS_SET is unset --- components/esp8266/source/esp_wifi.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/esp8266/source/esp_wifi.c b/components/esp8266/source/esp_wifi.c index 1cd45f4c..e1ca2c7e 100644 --- a/components/esp8266/source/esp_wifi.c +++ b/components/esp8266/source/esp_wifi.c @@ -20,7 +20,12 @@ #include "phy.h" const size_t _g_esp_wifi_ppt_task_stk_size = CONFIG_WIFI_PPT_TASKSTACK_SIZE; -const bool _g_esp_wifi_connect_open_router_when_pwd_is_set = CONFIG_ESP8266_WIFI_CONNECT_OPEN_ROUTER_WHEN_PWD_IS_SET; + +#if CONFIG_ESP8266_WIFI_CONNECT_OPEN_ROUTER_WHEN_PWD_IS_SET +const bool _g_esp_wifi_connect_open_router_when_pwd_is_set = true; +#else +const bool _g_esp_wifi_connect_open_router_when_pwd_is_set = false; +#endif esp_err_t esp_wifi_init_internal(const wifi_init_config_t *config);