From 1760c9347473365394226f176588c3c7e0684dd9 Mon Sep 17 00:00:00 2001 From: rofl0r Date: Thu, 29 Aug 2024 09:31:35 +0000 Subject: [PATCH] core: use string instead of compound literal fixes compilation when memcpy is defined as a function-like macro at the cost of one more byte used for the unused zero terminator. closes #578 --- src/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core.c b/src/core.c index d45597b..bd7691b 100644 --- a/src/core.c +++ b/src/core.c @@ -999,7 +999,7 @@ err_nn: } else if(!node && !(hints->ai_flags & AI_PASSIVE)) { af = ((struct sockaddr_in *) &space->sockaddr_space)->sin_family = AF_INET; memcpy(&((struct sockaddr_in *) &space->sockaddr_space)->sin_addr, - (char[]){127,0,0,1}, 4); + "\177\0\0\1", 4); } if(service) mygetservbyname_r(service, NULL, &se_buf, buf, sizeof(buf), &se);