Skip to content

Commit e4bd8e0

Browse files
xqyjljGuozhanxin
authored andcommitted
✨ feat(components/lwp/lwp.c): add OS env to default environ
1 parent 954f1d9 commit e4bd8e0

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

components/lwp/lwp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,6 +1329,7 @@ char **__environ = 0;
13291329

13301330
pid_t exec(char *filename, int debug, int argc, char **argv)
13311331
{
1332+
setenv("OS", "RT-Thread", 1);
13321333
return lwp_execve(filename, debug, argc, argv, __environ);
13331334
}
13341335

components/lwp/lwp_syscall.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4584,7 +4584,7 @@ sysret_t sys_uname(struct utsname *uts)
45844584
{
45854585
struct utsname utsbuff = {0};
45864586
int ret = 0;
4587-
char *machine;
4587+
const char *machine;
45884588

45894589
if (!lwp_user_accessable((void *)uts, sizeof(struct utsname)))
45904590
{

0 commit comments

Comments
 (0)