diff --git a/components/libc/compilers/newlib/minilib.c b/components/libc/compilers/newlib/minilib.c index 1210880b962b7b0510db65cd27852257333f2033..2d07eabe5a029e1d135c07221bf70ef0080fcd8f 100644 --- a/components/libc/compilers/newlib/minilib.c +++ b/components/libc/compilers/newlib/minilib.c @@ -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*/