Skip to content

Commit e5f1822

Browse files
committed
move strtok below strtok_r to fix compile issue
1 parent d669e77 commit e5f1822

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

esp8266com/esp8266/cores/esp8266/libc_replacements.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
/*
1+
/*
22
libc_replacements.c - replaces libc functions with functions
33
from Espressif SDK
44
55
Copyright (c) 2015 Ivan Grokhotkov. All rights reserved.
66
This file is part of the esp8266 core for Arduino environment.
7-
7+
88
This library is free software; you can redistribute it and/or
99
modify it under the terms of the GNU Lesser General Public
1010
License as published by the Free Software Foundation; either
@@ -159,10 +159,6 @@ char* ICACHE_FLASH_ATTR strncat(char * dest, const char * src, size_t n) {
159159
return dest;
160160
}
161161

162-
char* ICACHE_FLASH_ATTR strtok(char * str, const char * delimiters) {
163-
return strtok_r(str, delimiters, NULL);
164-
}
165-
166162
char* ICACHE_FLASH_ATTR strtok_r(char * str, const char * delimiters, char ** temp) {
167163
static char * ret = NULL;
168164
char * start = NULL;
@@ -205,6 +201,10 @@ char* ICACHE_FLASH_ATTR strtok_r(char * str, const char * delimiters, char ** te
205201
return ret;
206202
}
207203

204+
char* ICACHE_FLASH_ATTR strtok(char * str, const char * delimiters) {
205+
return strtok_r(str, delimiters, NULL);
206+
}
207+
208208
int strcasecmp(const char * str1, const char * str2) {
209209
int d = 0;
210210
while(1) {

0 commit comments

Comments
 (0)