IAR编译器dlib __close,__lseek hanle传入正确值

This commit is contained in:
Roamboy 2016-08-05 21:08:30 +08:00
parent f658611145
commit 29411bca71
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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