Skip to content

Commit

Permalink
Merge pull request #89 from gregslomin/esp8266
Browse files Browse the repository at this point in the history
Fix for undefined reference to strtok_r
  • Loading branch information
igrr committed Apr 21, 2015
2 parents ec4f53e + 208a068 commit 2edc522
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions hardware/esp8266com/esp8266/cores/esp8266/libc_replacements.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,6 @@ 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;
Expand Down Expand Up @@ -205,6 +202,10 @@ char* ICACHE_FLASH_ATTR strtok_r(char * str, const char * delimiters, char ** te
return ret;
}

char* ICACHE_FLASH_ATTR strtok(char * str, const char * delimiters) {
return strtok_r(str, delimiters, NULL);
}

int strcasecmp(const char * str1, const char * str2) {
int d = 0;
while(1) {
Expand Down

0 comments on commit 2edc522

Please sign in to comment.