diff options
Diffstat (limited to 'methods')
-rw-r--r-- | methods/CMakeLists.txt | 2 | ||||
-rw-r--r-- | methods/connect.cc | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/methods/CMakeLists.txt b/methods/CMakeLists.txt index 2417c4dc1..82ae70e7d 100644 --- a/methods/CMakeLists.txt +++ b/methods/CMakeLists.txt @@ -21,7 +21,7 @@ target_link_libraries(store apt-pkg) target_link_libraries(gpgv apt-pkg) target_link_libraries(cdrom apt-pkg) target_link_libraries(http apt-pkg) -target_link_libraries(mirror apt-pkg -lresolv) +target_link_libraries(mirror apt-pkg ${RESOLV_LIBRARIES}) target_link_libraries(https apt-pkg ${CURL_LIBRARIES}) target_link_libraries(ftp apt-pkg) target_link_libraries(rred apt-pkg) 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. |