diff --git a/components/libc/compilers/newlib/syscalls.c b/components/libc/compilers/newlib/syscalls.c index 759feafe67..9919e11727 100644 --- a/components/libc/compilers/newlib/syscalls.c +++ b/components/libc/compilers/newlib/syscalls.c @@ -27,6 +27,14 @@ /* Reentrant versions of system calls. */ +#ifndef _REENT_ONLY +int * +__errno () +{ + return _rt_errno(); +} +#endif + int _close_r(struct _reent *ptr, int fd) {