diff options
| author | bernard <[email protected]> | 2015-01-31 21:59:58 +0800 |
|---|---|---|
| committer | bernard <[email protected]> | 2015-01-31 21:59:58 +0800 |
| commit | 2c885336592b747fbad13c23c656934ec2913f72 (patch) | |
| tree | bd8beddc6882737b5f0034d8a68f78be2ad00684 /components/libc/dlib/syscall_write.c | |
| parent | 622e6d8238489b04219af34e0377b050a17a4d4c (diff) | |
[LIBC] fix compiling issue for dlib (IAR).
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 } |
