diff options
| author | Meco Man <[email protected]> | 2021-10-26 00:51:32 -0400 |
|---|---|---|
| committer | Meco Man <[email protected]> | 2021-10-26 23:09:54 -0400 |
| commit | a9910a780edc43df6b64bcd13c37785a15ec3428 (patch) | |
| tree | 0402e433f252c5ded3472deb266616ee7a47e90f /components/libc/compilers/dlib/syscall_close.c | |
| parent | 50bb6e33d13237f71812e81a6a13ba5ba0693c8f (diff) | |
[posix][libc] 优化libc中posix结构
Diffstat (limited to 'components/libc/compilers/dlib/syscall_close.c')
| -rw-r--r-- | components/libc/compilers/dlib/syscall_close.c | 11 |
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 */ } |
