curl_addrinfo: drop workaround for old-mingw

Follow-up to a3585c9576 #15543

Closes #18038
This commit is contained in:
Viktor Szakats 2025-07-27 10:57:07 +02:00
parent 2f80a9b253
commit c4430c542a
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201

View file

@ -398,11 +398,7 @@ Curl_ip2addr(int af, const void *inaddr, const char *hostname, int port)
addr = (void *)ai->ai_addr; /* storage area for this info */
memcpy(&addr->sin_addr, inaddr, sizeof(struct in_addr));
#ifdef __MINGW32__
addr->sin_family = (short)af;
#else
addr->sin_family = (CURL_SA_FAMILY_T)af;
#endif
addr->sin_port = htons((unsigned short)port);
break;
@ -411,11 +407,7 @@ Curl_ip2addr(int af, const void *inaddr, const char *hostname, int port)
addr6 = (void *)ai->ai_addr; /* storage area for this info */
memcpy(&addr6->sin6_addr, inaddr, sizeof(struct in6_addr));
#ifdef __MINGW32__
addr6->sin6_family = (short)af;
#else
addr6->sin6_family = (CURL_SA_FAMILY_T)af;
#endif
addr6->sin6_port = htons((unsigned short)port);
break;
#endif