summaryrefslogtreecommitdiff
path: root/components/libc/dlib/syscall_write.c
diff options
context:
space:
mode:
Diffstat (limited to 'components/libc/dlib/syscall_write.c')
-rw-r--r--components/libc/dlib/syscall_write.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/components/libc/dlib/syscall_write.c b/components/libc/dlib/syscall_write.c
index 5f21bf9bb9..a7140b9818 100644
--- a/components/libc/dlib/syscall_write.c
+++ b/components/libc/dlib/syscall_write.c
@@ -23,6 +23,9 @@
*/
#include <rtthread.h>
+#ifdef RT_USING_DFS
+#include <dfs_posix.h>
+#endif
#include <yfuns.h>
#pragma module_name = "?__write"
@@ -47,12 +50,12 @@ size_t __write(int handle, const unsigned char *buf, size_t len)
#endif
}
- if (handle == STDIN) return -1;
+ if (handle == _LLIO_STDIN) return -1;
#ifndef RT_USING_DFS
return _LLIO_ERROR;
#else
- size = write(handle - STDERR - 1, buf, len);
+ size = write(handle - _LLIO_STDERR - 1, buf, len);
return size;
#endif
}