summaryrefslogtreecommitdiff
path: root/components/libc/compilers/dlib/syscall_close.c
diff options
context:
space:
mode:
authorliqiwen <[email protected]>2021-10-27 19:57:28 +0800
committerliqiwen <[email protected]>2021-10-27 19:57:28 +0800
commit9f100ce9805d06d5fa132e3b65fcf2050a7b860b (patch)
tree638536b0cfc29db17973c6e650aec81cade2ab3d /components/libc/compilers/dlib/syscall_close.c
parentbbabae442906c8e9f302092532e655f80d24b9ac (diff)
parentbb859e79e0836f27030adcf8a8e9afb26ae4dab4 (diff)
Merge branch 'master' of github.com:RT-Thread/rt-thread into dev_li
Diffstat (limited to 'components/libc/compilers/dlib/syscall_close.c')
-rw-r--r--components/libc/compilers/dlib/syscall_close.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/components/libc/compilers/dlib/syscall_close.c b/components/libc/compilers/dlib/syscall_close.c
index 7ed1cc2f2d..bafe21aa4b 100644
--- a/components/libc/compilers/dlib/syscall_close.c
+++ b/components/libc/compilers/dlib/syscall_close.c
@@ -8,10 +8,8 @@
* 2015-01-28 Bernard first version
*/
#include <rtthread.h>
-#ifdef RT_USING_DFS
-#include <dfs_posix.h>
-#endif
#include <yfuns.h>
+#include <unistd.h>
#pragma module_name = "?__close"
int __close(int handle)
@@ -20,10 +18,9 @@ int __close(int handle)
handle == _LLIO_STDERR ||
handle == _LLIO_STDIN)
return _LLIO_ERROR;
-
-#ifdef RT_USING_DFS
+#ifdef RT_LIBC_USING_FILEIO
return close(handle);
#else
- return 0;
-#endif
+ return _LLIO_ERROR;
+#endif /* RT_LIBC_USING_FILEIO */
}