summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
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