From 29f189bf59cb31a8f9681329e249819dd201d234 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Sat, 10 Mar 2018 11:23:59 +0100 Subject: [PATCH] Windows _dbus_listen_tcp_socket: Use AF_UNSPEC if family is unspecified Now that we cope with getting WSAEADDRNOTAVAIL when trying to listen on ::1 with IPv6 disabled, and gracefully fall back to only listening on 127.0.0.1, we can use AF_UNSPEC like the corresponding Unix code does. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=61922 --- dbus/dbus-sysdeps-win.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbus/dbus-sysdeps-win.c b/dbus/dbus-sysdeps-win.c index 40341a20..01394f30 100644 --- a/dbus/dbus-sysdeps-win.c +++ b/dbus/dbus-sysdeps-win.c @@ -1698,7 +1698,7 @@ _dbus_listen_tcp_socket (const char *host, _DBUS_ZERO (hints); if (!family) - hints.ai_family = AF_INET; + hints.ai_family = AF_UNSPEC; else if (!strcmp(family, "ipv4")) hints.ai_family = AF_INET; else if (!strcmp(family, "ipv6")) -- 2.12.3