From 22aae5a28cb72f9c952c1bffdaab5fe23d615026 Mon Sep 17 00:00:00 2001 From: kvoit Date: Sun, 29 May 2022 17:06:54 +0200 Subject: [PATCH 1/2] Fixed moved header file sha.h See https://github.com/espressif/esp-idf/issues/3245 --- src/utility/WebSockets.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utility/WebSockets.cpp b/src/utility/WebSockets.cpp index 5e32a93..aff4010 100755 --- a/src/utility/WebSockets.cpp +++ b/src/utility/WebSockets.cpp @@ -39,7 +39,7 @@ extern "C" { #ifdef ESP8266 #include #elif defined(ESP32) -#include +#include #else extern "C" { From e1f0f56d8be9948bb92a784329419c3497d03168 Mon Sep 17 00:00:00 2001 From: kvoit Date: Tue, 3 Jan 2023 09:32:21 +0100 Subject: [PATCH 2/2] Support for both old and new IDF versions --- src/utility/WebSockets.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/utility/WebSockets.cpp b/src/utility/WebSockets.cpp index aff4010..2b38fe8 100755 --- a/src/utility/WebSockets.cpp +++ b/src/utility/WebSockets.cpp @@ -39,7 +39,11 @@ extern "C" { #ifdef ESP8266 #include #elif defined(ESP32) -#include +#if ESP_IDF_VERSION_MAJOR > 3 // ESP_IDF_VERSION_MINOR +#include +#else +#include +#endif #else extern "C" {