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

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

Co-authored-by: Man, Jianting (Meco) <920369182@qq.com>
This commit is contained in:
wdfk-prog 2022-11-24 13:12:48 +08:00 committed by GitHub
parent 3e2beebe43
commit cef57d006d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)
{