use AI_ADDRCONFIG with getaddrinfo()

Fixes IPv4 systems with IPv6 present but disabled.
Fix courtesy of Quentin Smart (sm3rt)
This commit is contained in:
James Laird
2013-04-02 21:39:53 +11:00
parent 4a752e67e4
commit c53054ec0a
+1 -1
View File
@@ -675,7 +675,7 @@ void rtsp_listen_loop(void) {
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
hints.ai_flags = AI_PASSIVE;
hints.ai_flags = AI_PASSIVE | AI_ADDRCONFIG;
snprintf(portstr, 6, "%d", config.port);