diff options
| author | guo <[email protected]> | 2021-10-27 12:22:35 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-10-27 12:22:35 +0800 |
| commit | 4d256eb308f4e9f7abc1644dda3fd675e560d518 (patch) | |
| tree | 4da0b0458ca8749c4fcee2ede8681304641ba89d /components/libc/compilers/dlib/syscall_close.c | |
| parent | 31bf735d2159995358315036be1529523ac96d7d (diff) | |
| parent | a9910a780edc43df6b64bcd13c37785a15ec3428 (diff) | |
Merge pull request #5228 from mysterywolf/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 */ } |
