summaryrefslogtreecommitdiff
path: root/components/libc/compilers/dlib/syscall_close.c
diff options
context:
space:
mode:
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 */
}