summaryrefslogtreecommitdiff
path: root/components/libc/compilers/dlib/syscall_remove.c
diff options
context:
space:
mode:
authorguo <[email protected]>2021-10-27 12:22:35 +0800
committerGitHub <[email protected]>2021-10-27 12:22:35 +0800
commit4d256eb308f4e9f7abc1644dda3fd675e560d518 (patch)
tree4da0b0458ca8749c4fcee2ede8681304641ba89d /components/libc/compilers/dlib/syscall_remove.c
parent31bf735d2159995358315036be1529523ac96d7d (diff)
parenta9910a780edc43df6b64bcd13c37785a15ec3428 (diff)
Merge pull request #5228 from mysterywolf/posix
Diffstat (limited to 'components/libc/compilers/dlib/syscall_remove.c')
-rw-r--r--components/libc/compilers/dlib/syscall_remove.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/components/libc/compilers/dlib/syscall_remove.c b/components/libc/compilers/dlib/syscall_remove.c
index 7d74236f4c..05bfbb67ae 100644
--- a/components/libc/compilers/dlib/syscall_remove.c
+++ b/components/libc/compilers/dlib/syscall_remove.c
@@ -8,17 +8,15 @@
* 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 = "?remove"
int remove(const char *val)
{
-#ifndef RT_USING_DFS
- return -1;
-#else
+#ifdef RT_USING_POSIX
return unlink(val);
-#endif
+#else
+ return -1;
+#endif /* RT_USING_POSIX */
}