]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
curl_addrinfo: drop workaround for old-mingw
authorViktor Szakats <commit@vsz.me>
Sun, 27 Jul 2025 08:57:07 +0000 (10:57 +0200)
committerViktor Szakats <commit@vsz.me>
Sun, 27 Jul 2025 09:32:27 +0000 (11:32 +0200)
Follow-up to a3585c9576abccddbd27200058912cef900c3c0f #15543

Closes #18038

lib/curl_addrinfo.c

index b131c747b10b1837156eff797cc6595b852c4099..310a5b6ab859d909e06bc54668ae76653c4adfda 100644 (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