diff --git a/esphome/components/gsm/gsm_component.cpp b/esphome/components/gsm/gsm_component.cpp index c032056d3e..4fb782048b 100644 --- a/esphome/components/gsm/gsm_component.cpp +++ b/esphome/components/gsm/gsm_component.cpp @@ -1,4 +1,4 @@ -#if defined(USE_ESP32) || defined(USE_ESP_IDF) +#ifdef USE_ESP_IDF #include "gsm_component.h" #include "esphome/core/log.h" #include "esphome/core/application.h" @@ -6,7 +6,6 @@ #include "esphome/components/network/util.h" #include #include -#include #include #include #include diff --git a/esphome/components/gsm/gsm_component.h b/esphome/components/gsm/gsm_component.h index 9b1cbd037f..d403a0385d 100644 --- a/esphome/components/gsm/gsm_component.h +++ b/esphome/components/gsm/gsm_component.h @@ -2,11 +2,13 @@ #include #include "esphome/core/component.h" +#include "esphome/core/log.h" #include "esphome/components/network/util.h" -#if defined(USE_ESP32) || defined(USE_ESP_IDF) +#ifdef USE_ESP_IDF -#include +using esphome::esp_log_printf_; // esp_modem will use esphome logger (needed if other components include + // esphome/core/log.h) #include #include #include