diff --git a/src/utility/WebSockets.cpp b/src/utility/WebSockets.cpp index 5e32a93..2b38fe8 100755 --- a/src/utility/WebSockets.cpp +++ b/src/utility/WebSockets.cpp @@ -39,7 +39,11 @@ extern "C" { #ifdef ESP8266 #include #elif defined(ESP32) +#if ESP_IDF_VERSION_MAJOR > 3 // ESP_IDF_VERSION_MINOR +#include +#else #include +#endif #else extern "C" {