From 7ccb5cbcedeb16f1fea6d0594e8053d7dd09eb22 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 9 Jun 2026 06:57:25 +0000 Subject: [PATCH] chore: align getaddrinfo hints copy flow --- components/lwp/lwp_syscall.c | 6 +++--- 1 file 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