From 6aafd3a7663eed33f14e8b1bddb51554aee5cee0 Mon Sep 17 00:00:00 2001 From: EduardoMorras <77385238+EduardoMorras@users.noreply.github.com> Date: Thu, 9 Jan 2025 10:28:50 +0100 Subject: [PATCH] Fix Portability issue with inet_aton on FreeBSD 13.2 chapel-lang#22549 Fix Portability issue with inet_aton on FreeBSD 13.x and 14.x #22549 Updated inet_aton to inet_pton system call. Signed-off-by : emorras@emorras.eu --- runtime/src/qio/sys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/src/qio/sys.c b/runtime/src/qio/sys.c index cd8dd39c4c38..f7ba6a1000be 100644 --- a/runtime/src/qio/sys.c +++ b/runtime/src/qio/sys.c @@ -116,7 +116,7 @@ int sys_set_sys_sockaddr_t(sys_sockaddr_t* addr, const char* host, u_int16_t por struct sockaddr_in *addr_inet = (struct sockaddr_in *)&addr->addr; addr_inet->sin_family = AF_INET; addr_inet->sin_port = htons(port); - return inet_aton(host, &addr_inet->sin_addr); + return inet_pton(AF_INET, host, &addr_inet->sin_addr); } else if(family == AF_INET6){ struct sockaddr_in6 *addr_inet6 = (struct sockaddr_in6 *)&addr->addr;