summaryrefslogtreecommitdiff
path: root/methods/connect.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2016-09-01 00:53:40 +0200
committerJulian Andres Klode <jak@debian.org>2016-09-01 00:53:40 +0200
commit265c3312bd1b329dc9b54c754da46621d9019c11 (patch)
treee1c740747f84f793ee2b6ab4ffaffbc9f76cd575 /methods/connect.cc
parent28f0867d99398a23296ead313112402c51d4e876 (diff)
parent317bb39f3cd6626c74f25d7bdf2907f1b235f553 (diff)
Merge tag '1.3_rc3' into ubuntu/master
apt Debian release 1.3~rc3
Diffstat (limited to 'methods/connect.cc')
-rw-r--r--methods/connect.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/methods/connect.cc b/methods/connect.cc
index c819c1dfb..cb2f83588 100644
--- a/methods/connect.cc
+++ b/methods/connect.cc
@@ -180,8 +180,10 @@ static bool ConnectToHostname(std::string const &Host, int const Port,
memset(&Hints,0,sizeof(Hints));
Hints.ai_socktype = SOCK_STREAM;
Hints.ai_flags = 0;
+#ifdef AI_IDN
if (_config->FindB("Acquire::Connect::IDN", true) == true)
Hints.ai_flags |= AI_IDN;
+#endif
// see getaddrinfo(3): only return address if system has such a address configured
// useful if system is ipv4 only, to not get ipv6, but that fails if the system has
// no address configured: e.g. offline and trying to connect to localhost.