瀏覽代碼

Merge pull request #650 from roamboy/master

IAR编译器dlib
Bernard Xiong 9 年之前
父節點
當前提交
a0d264ba72
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      components/libc/dlib/syscall_close.c
  2. 1 1
      components/libc/dlib/syscall_lseek.c

+ 1 - 1
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

+ 1 - 1
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