From 8626304165be05787de6b3bfe0beb7e35d67890b Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Thu, 6 Jun 2019 15:20:20 +0200 Subject: [PATCH] Fix AWS related core 2.3.0 compile error Fix AWS related core 2.3.0 compile error --- sonoff/sonoff_aws_iot.cpp | 5 +++++ sonoff/sonoff_post.h | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/sonoff/sonoff_aws_iot.cpp b/sonoff/sonoff_aws_iot.cpp index 1bb476e61..cefdb556b 100644 --- a/sonoff/sonoff_aws_iot.cpp +++ b/sonoff/sonoff_aws_iot.cpp @@ -17,6 +17,9 @@ along with this program. If not, see . */ +#include +#ifdef USE_MQTT_AWS_IOT + #include #include @@ -145,3 +148,5 @@ const br_ec_private_key *AWS_IoT_Private_Key = &EC; const br_x509_certificate *AWS_IoT_Client_Certificate = &CHAIN[0]; } + +#endif // USE_MQTT_AWS_IOT \ No newline at end of file diff --git a/sonoff/sonoff_post.h b/sonoff/sonoff_post.h index 0839b15ca..99868a1ba 100644 --- a/sonoff/sonoff_post.h +++ b/sonoff/sonoff_post.h @@ -46,6 +46,13 @@ void KNX_CB_Action(message_t const &msg, void *arg); * Default global defines \*********************************************************************************************/ +#ifdef USE_MQTT_AWS_IOT +#include +#ifndef ARDUINO_ESP8266_RELEASE_2_5_2 + #error "USE_MQTT_AWS_IOT is only supported on core version 2.5.2" +#endif +#endif + #if defined(USE_MQTT_TLS) || defined(USE_MQTT_AWS_IOT) const uint16_t WEB_LOG_SIZE = 2000; // Max number of characters in weblog #else