diff --git a/components/libc/compilers/common/unistd.c b/components/libc/compilers/common/unistd.c index 7ecd455480..0966242e55 100644 --- a/components/libc/compilers/common/unistd.c +++ b/components/libc/compilers/common/unistd.c @@ -50,13 +50,7 @@ int usleep(useconds_t usec) } RTM_EXPORT(usleep); -pid_t -#if defined (RT_USING_NEWLIB) -__rt_libc_getpid -#else -getpid -#endif -(void) +pid_t getpid(void) { /*TODO*/ return 0; diff --git a/components/libc/compilers/newlib/syscalls.c b/components/libc/compilers/newlib/syscalls.c index 28e1808e3f..45aa4a34de 100644 --- a/components/libc/compilers/newlib/syscalls.c +++ b/components/libc/compilers/newlib/syscalls.c @@ -38,8 +38,7 @@ __errno () int _getpid_r(struct _reent *ptr) { - extern pid_t __rt_libc_getpid(void); - return __rt_libc_getpid(); + return 0; } int