summaryrefslogtreecommitdiffstats
path: root/stream/tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream/tcp.c')
-rw-r--r--stream/tcp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/stream/tcp.c b/stream/tcp.c
index 1bc536d41a..2222cca1db 100644
--- a/stream/tcp.c
+++ b/stream/tcp.c
@@ -99,6 +99,14 @@ connect2Server_with_af(char *host, int port, int af,int verb) {
struct timeval to;
#endif
+#if HAVE_WINSOCK2_H && defined(HAVE_AF_INET6)
+ // our winsock name resolution code can not handle IPv6
+ if (af == AF_INET6) {
+ mp_msg(MSGT_NETWORK, MSGL_WARN, "IPv6 not supported for winsock2\n");
+ return TCP_ERROR_FATAL;
+ }
+#endif
+
socket_server_fd = socket(af, SOCK_STREAM, 0);