diff options
| author | Bernard Xiong <[email protected]> | 2015-01-31 14:00:44 +0000 |
|---|---|---|
| committer | Bernard Xiong <[email protected]> | 2015-01-31 14:00:44 +0000 |
| commit | ca18a17180528b5ed408a591bdd302f64940105b (patch) | |
| tree | 27ccb23ace2bb9a6ba5cc893240a6456ea3e303a /components/libc/dlib/syscall_write.c | |
| parent | 390973a755fbf0d1365a8a9940662cfeb1750f76 (diff) | |
| parent | 2c885336592b747fbad13c23c656934ec2913f72 (diff) | |
Merge remote-tracking branch 'china/master'
Diffstat (limited to 'components/libc/dlib/syscall_write.c')
| -rw-r--r-- | components/libc/dlib/syscall_write.c | 7 |
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 } |
