From acf0bcc6c732d187d9f8b0946464c0438d0a5012 Mon Sep 17 00:00:00 2001 From: Hieromon Ikasamo Date: Mon, 22 Apr 2019 16:48:00 +0900 Subject: [PATCH] Fixed compile error with older than ESP8266 core 2.5.0 --- src/AutoConnectUploadImpl.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/AutoConnectUploadImpl.h b/src/AutoConnectUploadImpl.h index 75ec614..baf935e 100644 --- a/src/AutoConnectUploadImpl.h +++ b/src/AutoConnectUploadImpl.h @@ -11,6 +11,7 @@ #define _AUTOCONNECTUPLOADIMPL_H_ #if defined(ARDUINO_ARCH_ESP8266) +#include #include #elif defined(ARDUINO_ARCH_ESP32) #include @@ -132,7 +133,9 @@ class AutoConnectUploadSD : public AutoConnectUploadHandler { void _close(void) override { if (_file) _file.close(); +#if defined(ARDUINO_ARCH_ESP32) || (defined(ARDUINO_ARCH_ESP8266) && (!defined(ARDUINO_ESP8266_RELEASE_2_4_0) && !defined(ARDUINO_ESP8266_RELEASE_2_4_1) && !defined(ARDUINO_ESP8266_RELEASE_2_4_2))) _media->end(); +#endif } private: