diff --git a/esphome/components/esp32/hal.cpp b/esphome/components/esp32/hal.cpp index 3a0836a507..f6199d557f 100644 --- a/esphome/components/esp32/hal.cpp +++ b/esphome/components/esp32/hal.cpp @@ -1,7 +1,9 @@ #ifdef USE_ESP32 -#include "crash_handler.h" +// defines.h must come before crash_handler.h so USE_ESP32_CRASH_HANDLER is set +// before crash_handler.h's #ifdef-guarded namespace block is parsed. #include "esphome/core/defines.h" +#include "crash_handler.h" #include "esphome/core/hal.h" #include diff --git a/esphome/core/hal/hal_esp8266.h b/esphome/core/hal/hal_esp8266.h index 0b8fca6aa5..b6e3b1ee3c 100644 --- a/esphome/core/hal/hal_esp8266.h +++ b/esphome/core/hal/hal_esp8266.h @@ -22,6 +22,7 @@ extern "C" unsigned long millis(void); // NOLINTEND(google-runtime-int,readability-identifier-naming,readability-redundant-declaration) // Forward decl from for arch_feed_wdt() inline below. +// NOLINTNEXTLINE(readability-redundant-declaration) extern "C" void system_soft_wdt_feed(void); namespace esphome {