summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2016-08-06 08:00:24 +0800
committerGitHub <[email protected]>2016-08-06 08:00:24 +0800
commita0d264ba7245fb9ddbd2bf45652286655499066c (patch)
tree076592e540d9a7954e1441e12ffb50623bd92bc1
parentf65861114519fe6fe1eae8a8c0b4166d71895e57 (diff)
parent29411bca714249322b0c2288036db4a7fcd3fe94 (diff)
Merge pull request #650 from roamboy/master
IAR编译器dlib
-rw-r--r--components/libc/dlib/syscall_close.c2
-rw-r--r--components/libc/dlib/syscall_lseek.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/components/libc/dlib/syscall_close.c b/components/libc/dlib/syscall_close.c
index 5792bb3806..c2bb0b63d6 100644
--- a/components/libc/dlib/syscall_close.c
+++ b/components/libc/dlib/syscall_close.c
@@ -36,7 +36,7 @@ int __close(int handle)
return _LLIO_ERROR;
#ifdef RT_USING_DFS
- return close(handle);
+ return close(handle - _LLIO_STDERR - 1);
#else
return 0;
#endif
diff --git a/components/libc/dlib/syscall_lseek.c b/components/libc/dlib/syscall_lseek.c
index 950ba52f65..23d509817e 100644
--- a/components/libc/dlib/syscall_lseek.c
+++ b/components/libc/dlib/syscall_lseek.c
@@ -36,7 +36,7 @@ long __lseek(int handle, long offset, int whence)
return _LLIO_ERROR;
#ifdef RT_USING_DFS
- return lseek(handle, offset, whence);
+ return lseek(handle - _LLIO_STDERR - 1, offset, whence);
#else
return _LLIO_ERROR;
#endif