diff --git a/cores/esp8266/Arduino.h b/cores/esp8266/Arduino.h index f507bef3b..257dc3767 100644 --- a/cores/esp8266/Arduino.h +++ b/cores/esp8266/Arduino.h @@ -20,18 +20,23 @@ #ifndef Arduino_h #define Arduino_h +#ifdef __cplusplus +extern "C" { +#endif + #include #include #include +#include +#include +#include #include #include #include "binary.h" #include "pgmspace.h" -#ifdef __cplusplus -extern "C" { -#endif + void yield(void); diff --git a/cores/esp8266/libc_replacements.c b/cores/esp8266/libc_replacements.c index baeb63fee..7d6260d1e 100644 --- a/cores/esp8266/libc_replacements.c +++ b/cores/esp8266/libc_replacements.c @@ -159,6 +159,10 @@ char* ICACHE_FLASH_ATTR strncat(char * dest, const char * src, size_t n) { return dest; } +char* ICACHE_FLASH_ATTR strtok(char * str, const char * delimiters) { + return strtok_r(str, delimiters, NULL); +} + char* ICACHE_FLASH_ATTR strtok_r(char * str, const char * delimiters, char ** temp) { static char * ret = NULL; char * start = NULL;