summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorcopilot-swe-agent[bot] <[email protected]>2026-06-09 06:57:25 +0000
committerGitHub <[email protected]>2026-06-09 06:57:25 +0000
commit7ccb5cbcedeb16f1fea6d0594e8053d7dd09eb22 (patch)
treeec67fc5ba9ecee3bded1691e3cc2b05013d7107b /components
parentc7ff65ca6e8eb08620dd8caf09f588bbe31e27b5 (diff)
chore: align getaddrinfo hints copy flowcopilot/fix-sys-getaddrinfo-bug
Diffstat (limited to 'components')
-rw-r--r--components/lwp/lwp_syscall.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/lwp/lwp_syscall.c b/components/lwp/lwp_syscall.c
index 6622f05218..06438982bb 100644
--- a/components/lwp/lwp_syscall.c
+++ b/components/lwp/lwp_syscall.c
@@ -7058,6 +7058,7 @@ sysret_t sys_getaddrinfo(const char *nodename,
char *k_nodename = NULL;
char *k_servname = NULL;
struct addrinfo *k_hints = NULL;
+ struct musl_addrinfo k_hints_musl;
struct musl_addrinfo k_res_musl;
struct musl_sockaddr *u_res_ai_addr = NULL;
#ifdef ARCH_MM_MMU
@@ -7153,7 +7154,6 @@ sysret_t sys_getaddrinfo(const char *nodename,
if (hints)
{
- struct musl_addrinfo k_hints_musl;
#ifdef ARCH_MM_MMU
if (!lwp_user_accessable((void *)hints, sizeof(struct musl_addrinfo)))
{
@@ -7214,8 +7214,8 @@ sysret_t sys_getaddrinfo(const char *nodename,
if (hints != NULL)
{
/* copy socktype & protocol from hints if specified */
- k_res_musl.ai_socktype = k_hints->ai_socktype;
- k_res_musl.ai_protocol = k_hints->ai_protocol;
+ k_res_musl.ai_socktype = k_hints_musl.ai_socktype;
+ k_res_musl.ai_protocol = k_hints_musl.ai_protocol;
}
#ifdef ARCH_MM_MMU