This commit is contained in:
Meco Man 2021-02-23 11:16:41 +08:00
parent f9ad7f1b8c
commit 6ee0d45644
1 changed files with 0 additions and 13 deletions

View File

@ -16,16 +16,3 @@ void * _sbrk_r(struct _reent *ptr, ptrdiff_t incr)
/* no use this routine to get memory */
return RT_NULL;
}
#ifdef RT_USING_HEAP
char *strdup(const char *s)
{
size_t len = strlen(s) + 1;
char *tmp = (char *)rt_malloc(len);
if(!tmp) return NULL;
rt_memcpy(tmp, s, len);
return tmp;
}
#endif /*RT_USING_HEAP*/