summaryrefslogtreecommitdiff
path: root/components/libc/compilers
diff options
context:
space:
mode:
authorMeco Man <[email protected]>2021-11-13 00:17:16 -0500
committerMeco Man <[email protected]>2021-11-13 00:17:16 -0500
commit215d1d4c6eebf5e82aa4731ec673d0ff5c9b98c1 (patch)
tree18e51ce00fb9075ea216fe735f1640ba3c7e8708 /components/libc/compilers
parent3a3b7ee63288456a7e80e42a3480ea19d4bd645b (diff)
[libc][kconfig] update Kconfig
Diffstat (limited to 'components/libc/compilers')
-rw-r--r--components/libc/compilers/gcc/newlib/syscalls.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/components/libc/compilers/gcc/newlib/syscalls.c b/components/libc/compilers/gcc/newlib/syscalls.c
index 7c25ffac3f..f3a2f5bfcf 100644
--- a/components/libc/compilers/gcc/newlib/syscalls.c
+++ b/components/libc/compilers/gcc/newlib/syscalls.c
@@ -80,7 +80,7 @@ void _free_r (struct _reent *ptr, void *addr)
void *
_sbrk_r(struct _reent *ptr, ptrdiff_t incr)
{
- LOG_E("Please enable RT_USING_HEAP or RT_USING_LIBC");
+ LOG_E("Please enable RT_USING_HEAP");
RT_ASSERT(0);
return RT_NULL;
}
@@ -109,7 +109,12 @@ int _getpid_r(struct _reent *ptr)
int _close_r(struct _reent *ptr, int fd)
{
+#ifdef RT_USING_POSIX
return close(fd);
+#else
+ ptr->_errno = ENOTSUP;
+ return -1;
+#endif
}
int _execve_r(struct _reent *ptr, const char * name, char *const *argv, char *const *env)