fix(portability): replace POSIX-only string funcs and legacy hostent fields

This commit is contained in:
2026-01-26 15:56:52 -07:00
parent 4ad5df0370
commit 4008d94571
7 changed files with 20 additions and 14 deletions

View File

@@ -323,8 +323,8 @@ dcc_lookup_proxy (char *host, struct sockaddr_in *addr)
h = gethostbyname (host);
if (h != NULL && h->h_length == 4 && h->h_addr_list[0] != NULL)
{
memcpy (&addr->sin_addr, h->h_addr, 4);
memcpy (&cache_addr, h->h_addr, 4);
memcpy (&addr->sin_addr, h->h_addr_list[0], 4);
memcpy (&cache_addr, h->h_addr_list[0], 4);
cache_host = g_strdup (host);
/* cppcheck-suppress memleak */
return TRUE;