diff --git a/esphome/components/network/ip_address.h b/esphome/components/network/ip_address.h index 7bf09078be..709524c9d1 100644 --- a/esphome/components/network/ip_address.h +++ b/esphome/components/network/ip_address.h @@ -3,7 +3,11 @@ #include #include #include +#include "esphome/core/macros.h" + +#if defined(USE_ESP_IDF) || defined(USE_LIBRETINY) || USE_ARDUINO_VERSION_CODE > VERSION_CODE(3, 0, 0) #include +#endif #if USE_ARDUINO #include