]> git.feebdaed.xyz Git - 0xmirror/curl.git/commitdiff
socketpair: drop redundant `_WIN32` branch and include
authorViktor Szakats <commit@vsz.me>
Fri, 19 Dec 2025 10:00:53 +0000 (11:00 +0100)
committerViktor Szakats <commit@vsz.me>
Fri, 19 Dec 2025 10:40:59 +0000 (11:40 +0100)
`io.h` already included via `curl_setup.h`, the other headers are
already guarded off for Windows. `INADDR_LOOPBACK` fallback remains
a no-op on Windows.

Closes #20032

lib/socketpair.c

index 35c68c3a50777617a7ade94bc72d03d61f065a0c..5a9ccb4aed85f24fddeb1e0195194736da41f5f7 100644 (file)
@@ -107,27 +107,20 @@ int Curl_socketpair(int domain, int type, int protocol,
 }
 #endif /* USE_SOCKETPAIR */
 #else /* !HAVE_SOCKETPAIR */
-#ifdef _WIN32
-/*
- * This is a socketpair() implementation for Windows.
- */
-#ifdef HAVE_IO_H
-#include <io.h>
-#endif
-#else
+
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
 #ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h> /* IPPROTO_TCP */
+#include <netinet/in.h> /* for IPPROTO_TCP */
 #endif
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
+
 #ifndef INADDR_LOOPBACK
 #define INADDR_LOOPBACK 0x7f000001
-#endif /* !INADDR_LOOPBACK */
-#endif /* !_WIN32 */
+#endif
 
 #include "curlx/nonblock.h" /* for curlx_nonblock */
 #include "curlx/timeval.h"  /* needed before select.h */