summaryrefslogtreecommitdiff
path: root/components/libc/compilers/dlib/syscall_open.c
diff options
context:
space:
mode:
author192.168.1.134 <[email protected]>2021-11-08 15:02:29 +0800
committer192.168.1.134 <[email protected]>2021-11-08 15:02:29 +0800
commit85da2247c050ff16842eba5927fc34a06564c5dc (patch)
treed489fbe3078ed99096210087be80759dd515d703 /components/libc/compilers/dlib/syscall_open.c
parent078c3c5991e3024664fe7a51878874e02bf107dc (diff)
parent9e7d7ae52544fd8e84f18734fd4216fc7659d9c9 (diff)
Merge branch 'master' of https://github.com/RT-Thread/rt-thread
Diffstat (limited to 'components/libc/compilers/dlib/syscall_open.c')
-rw-r--r--components/libc/compilers/dlib/syscall_open.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/components/libc/compilers/dlib/syscall_open.c b/components/libc/compilers/dlib/syscall_open.c
index 37bfcecb47..8fb3c3a11f 100644
--- a/components/libc/compilers/dlib/syscall_open.c
+++ b/components/libc/compilers/dlib/syscall_open.c
@@ -10,17 +10,13 @@
#include <rtthread.h>
#include <yfuns.h>
-#ifdef RT_USING_DFS
-#include <dfs_posix.h>
-#endif
+#include <fcntl.h>
#pragma module_name = "?__open"
int __open(const char *filename, int mode)
{
-#ifndef RT_USING_DFS
- return _LLIO_ERROR;
-#else
+#ifdef RT_USING_POSIX
int handle;
int open_mode = O_RDONLY;
@@ -70,5 +66,7 @@ int __open(const char *filename, int mode)
return _LLIO_ERROR;
return handle;
-#endif
+#else
+ return _LLIO_ERROR;
+#endif /* RT_USING_POSIX */
}