diff options
-rw-r--r-- | debian/patches/73_from4.4.1_no_AAAA_when_ipv6_disabled.diff | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/debian/patches/73_from4.4.1_no_AAAA_when_ipv6_disabled.diff b/debian/patches/73_from4.4.1_no_AAAA_when_ipv6_disabled.diff new file mode 100644 index 0000000..df618e1 --- /dev/null +++ b/debian/patches/73_from4.4.1_no_AAAA_when_ipv6_disabled.diff @@ -0,0 +1,30 @@ +--- a/src/network/kernel/qhostinfo_unix.cpp 2008-04-28 16:11:19.000000000 +0300 ++++ b/src/network/kernel/qhostinfo_unix.cpp 2008-06-08 02:35:23.000000000 +0300 +@@ -167,8 +167,19 @@ + struct addrinfo hints; + memset(&hints, 0, sizeof(hints)); + hints.ai_family = PF_UNSPEC; ++# ifdef AI_ADDRCONFIG ++ hints.ai_flags = AI_ADDRCONFIG; ++# endif + + int result = getaddrinfo(hostName.toLatin1().constData(), 0, &hints, &res); ++# ifdef AI_ADDRCONFIG ++ if (result == EAI_BADFLAGS) { ++ // if the lookup failed with AI_ADDRCONFIG set, try again without it ++ hints.ai_flags = 0; ++ result = getaddrinfo(hostName.toLatin1().constData(), 0, &hints, &res); ++ } ++# endif ++ + if (result == 0) { + addrinfo *node = res; + QList<QHostAddress> addresses; +@@ -200,7 +211,6 @@ + freeaddrinfo(res); + } else if (result == EAI_NONAME + || result == EAI_FAIL +- || result == EAI_FAIL + #ifdef EAI_NODATA + // EAI_NODATA is deprecated in RFC 3493 + || result == EAI_NODATA |