feat(components/lwp/lwp.c): add OS env to default environ

This commit is contained in:
xqyjlj 2023-03-28 15:53:15 +08:00 committed by guo
parent 954f1d9b63
commit e4bd8e00f0
2 changed files with 2 additions and 1 deletions

View File

@ -1329,6 +1329,7 @@ char **__environ = 0;
pid_t exec(char *filename, int debug, int argc, char **argv)
{
setenv("OS", "RT-Thread", 1);
return lwp_execve(filename, debug, argc, argv, __environ);
}

View File

@ -4584,7 +4584,7 @@ sysret_t sys_uname(struct utsname *uts)
{
struct utsname utsbuff = {0};
int ret = 0;
char *machine;
const char *machine;
if (!lwp_user_accessable((void *)uts, sizeof(struct utsname)))
{