From 02db6b632f6cceb962acfc19377f252a16ae3409 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Wed, 20 Nov 2019 17:57:32 +0100 Subject: [PATCH] Fix core < 2.6.0 compilation --- tasmota/support_legacy_cores.ino | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tasmota/support_legacy_cores.ino b/tasmota/support_legacy_cores.ino index 9a5cee2ae..a4c26e8c9 100644 --- a/tasmota/support_legacy_cores.ino +++ b/tasmota/support_legacy_cores.ino @@ -22,8 +22,6 @@ * Functions not available in core 2.3.0 \*********************************************************************************************/ -// Functions not available in 2.3.0 - // http://clc-wiki.net/wiki/C_standard_library:string.h:memchr void* memchr(const void* ptr, int value, size_t num) { @@ -137,6 +135,15 @@ unsigned long long strtoull(const char *__restrict nptr, char **__restrict endpt return acc; } +#endif // ARDUINO_ESP8266_RELEASE_2_3_0 + + + +#if defined(ARDUINO_ESP8266_RELEASE_2_3_0) || defined(ARDUINO_ESP8266_RELEASE_2_4_0) || defined(ARDUINO_ESP8266_RELEASE_2_4_1) || defined(ARDUINO_ESP8266_RELEASE_2_4_2) || defined(ARDUINO_ESP8266_RELEASE_2_5_0) || defined(ARDUINO_ESP8266_RELEASE_2_5_1) || defined(ARDUINO_ESP8266_RELEASE_2_5_2) +/*********************************************************************************************\ + * Functions not available in core before 2.6.0 +\*********************************************************************************************/ + // https://github.com/arendst/Tasmota/issues/6856#issuecomment-554258914 void* memmove_P(void *dest, const void *src, size_t n) { @@ -147,7 +154,4 @@ void* memmove_P(void *dest, const void *src, size_t n) } } -#endif // ARDUINO_ESP8266_RELEASE_2_3_0 -/*********************************************************************************************\ - * -\*********************************************************************************************/ +#endif // ARDUINO_ESP8266_RELEASE < 2_6_0