diff --git a/components/esp_local_ctrl/include/esp_local_ctrl.h b/components/esp_local_ctrl/include/esp_local_ctrl.h index f05e6473f4..2e9a56a0d3 100644 --- a/components/esp_local_ctrl/include/esp_local_ctrl.h +++ b/components/esp_local_ctrl/include/esp_local_ctrl.h @@ -10,6 +10,12 @@ extern "C" { #endif +#include +#ifdef CONFIG_ESP_HTTPS_SERVER_ENABLE +#include +#else +#include +#endif #include /** diff --git a/examples/protocols/esp_local_ctrl/main/esp_local_ctrl_service.c b/examples/protocols/esp_local_ctrl/main/esp_local_ctrl_service.c index 921dfb5438..6b38202eff 100644 --- a/examples/protocols/esp_local_ctrl/main/esp_local_ctrl_service.c +++ b/examples/protocols/esp_local_ctrl/main/esp_local_ctrl_service.c @@ -20,11 +20,7 @@ #include #include #include -#ifdef CONFIG_ESP_HTTPS_SERVER_ENABLE -#include -#else -#include -#endif + static const char *TAG = "control"; #define SERVICE_NAME "my_esp_ctrl_device"