diff options
| author | Meco Man <[email protected]> | 2021-02-23 11:16:41 +0800 |
|---|---|---|
| committer | Meco Man <[email protected]> | 2021-02-23 11:16:41 +0800 |
| commit | 6ee0d45644649eccea4edf89967f5eeca413478f (patch) | |
| tree | 49ba3a887030fa7a0e887b293166b66d7f01eaad /components/libc/compilers/newlib | |
| parent | f9ad7f1b8ca13af42f520b44f7ed5b2dee6a47e4 (diff) | |
update
Diffstat (limited to 'components/libc/compilers/newlib')
| -rw-r--r-- | components/libc/compilers/newlib/minilib.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/components/libc/compilers/newlib/minilib.c b/components/libc/compilers/newlib/minilib.c index 1210880b96..2d07eabe5a 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*/ |
