diff --git a/esphome/core/application.h b/esphome/core/application.h index 858269e09b7..6ae26927434 100644 --- a/esphome/core/application.h +++ b/esphome/core/application.h @@ -648,6 +648,7 @@ class Application { /// Detects the calling context and uses the appropriate FreeRTOS API. static void IRAM_ATTR wake_loop_any_context() { esphome_lwip_wake_main_loop_any_context(); } #endif +#endif // USE_LWIP_FAST_SELECT #if defined(USE_ESP8266) && defined(USE_SOCKET_IMPL_LWIP_TCP) /// Wake the main event loop from any context (ISR, thread, or main loop). diff --git a/esphome/core/lwip_fast_select.h b/esphome/core/lwip_fast_select.h index 92e63ff964a..fc3f6847a25 100644 --- a/esphome/core/lwip_fast_select.h +++ b/esphome/core/lwip_fast_select.h @@ -41,7 +41,7 @@ static inline bool esphome_lwip_socket_has_data(struct lwip_sock *sock) { // FreeRTOS mutex (ESP32) or resumes the scheduler (LibreTiny), ensuring the value // is visible. Aligned 16-bit reads are single-instruction loads (L16SI/LH/LDRH) on // Xtensa/RISC-V/ARM and cannot produce torn values. - return *(volatile int16_t *) ((char *) sock + ESPHOME_LWIP_SOCK_RCVEVENT_OFFSET) > 0; + return *(volatile int16_t *) ((char *) sock + (int) ESPHOME_LWIP_SOCK_RCVEVENT_OFFSET) > 0; } /// Hook a socket's netconn callback to notify the main loop task on receive events.