[armlibc] 修复AC6更新至6.19后_sys_tmpnam()函数编译报错, 直接从主分支的 commit #cef57d0 rebase过来。 (#9265)

[armlibc] 修复AC6更新至6.19后_sys_tmpnam()函数编译报错 (#6647)

* [armlibc] 修复AC6更新至6.19后_sys_tmpnam()函数编译报错

Co-authored-by: wdfk-prog <1425075683@qq.com>
Co-authored-by: Man, Jianting (Meco) <920369182@qq.com>
This commit is contained in:
Stoneman 2024-07-30 23:21:54 +08:00 committed by GitHub
parent 9376074b15
commit 7aa109ced8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 0 deletions

View File

@ -282,11 +282,18 @@ int _sys_seek(FILEHANDLE fh, long pos)
/**
* used by tmpnam() or tmpfile()
*/
#if __ARMCC_VERSION >= 6190000
void _sys_tmpnam(char *name, int fileno, unsigned maxlength)
{
rt_snprintf(name, maxlength, "tem%03d", fileno);
}
#else
int _sys_tmpnam(char *name, int fileno, unsigned maxlength)
{
rt_snprintf(name, maxlength, "tem%03d", fileno);
return 1;
}
#endif /* __ARMCC_VERSION >= 6190000 */
char *_sys_command_string(char *cmd, int len)
{