mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Link cpp-dns/udns unconditionally and update submodules to clickhouse fork
This commit is contained in:
parent
dcda1c5eb9
commit
5c00dcd884
4
.gitmodules
vendored
4
.gitmodules
vendored
@ -276,7 +276,7 @@
|
||||
url = https://github.com/ClickHouse/base-x.git
|
||||
[submodule "contrib/udns"]
|
||||
path = contrib/udns
|
||||
url = https://github.com/arthurpassos/udns.git
|
||||
url = https://github.com/ClickHouse/udns
|
||||
[submodule "contrib/cpp-dns"]
|
||||
path = contrib/cpp-dns
|
||||
url = https://github.com/YukiWorkshop/cpp-dns.git
|
||||
url = https://github.com/ClickHouse/cpp-dns
|
@ -2,9 +2,9 @@ set(LIBRARY_DIR "${ClickHouse_SOURCE_DIR}/contrib/cpp-dns")
|
||||
|
||||
set(SRCS "${LIBRARY_DIR}/DNSResolver.cpp")
|
||||
|
||||
set(HDRS "${LIBRARY_DIR}/DNSResolver.hpp")
|
||||
#set(HDRS "${LIBRARY_DIR}/DNSResolver.hpp")
|
||||
|
||||
add_library(_cpp-dns ${SRCS} ${HDRS})
|
||||
add_library(_cpp-dns ${SRCS})
|
||||
|
||||
target_link_libraries(_cpp-dns boost::system boost::headers_only ch_contrib::udns)
|
||||
|
||||
|
@ -1,22 +1,22 @@
|
||||
set(LIBRARY_DIR "${ClickHouse_SOURCE_DIR}/contrib/udns")
|
||||
|
||||
add_library(_udns
|
||||
"${LIBRARY_DIR}/udns_dn.c"
|
||||
"${LIBRARY_DIR}/udns_bl.c"
|
||||
"${LIBRARY_DIR}/udns_codes.c"
|
||||
"${LIBRARY_DIR}/udns_dntosp.c"
|
||||
"${LIBRARY_DIR}/udns_init.c"
|
||||
"${LIBRARY_DIR}/udns_jran.c"
|
||||
"${LIBRARY_DIR}/udns_misc.c"
|
||||
"${LIBRARY_DIR}/udns_parse.c"
|
||||
"${LIBRARY_DIR}/udns_resolver.c"
|
||||
"${LIBRARY_DIR}/udns_init.c"
|
||||
"${LIBRARY_DIR}/udns_misc.c"
|
||||
"${LIBRARY_DIR}/udns_XtoX.c"
|
||||
"${LIBRARY_DIR}/udns_rr_a.c"
|
||||
"${LIBRARY_DIR}/udns_rr_ptr.c"
|
||||
"${LIBRARY_DIR}/udns_rr_mx.c"
|
||||
"${LIBRARY_DIR}/udns_rr_txt.c"
|
||||
"${LIBRARY_DIR}/udns_bl.c"
|
||||
"${LIBRARY_DIR}/udns_rr_srv.c"
|
||||
"${LIBRARY_DIR}/udns_rr_naptr.c"
|
||||
"${LIBRARY_DIR}/udns_codes.c"
|
||||
"${LIBRARY_DIR}/udns_jran.c"
|
||||
"${LIBRARY_DIR}/udns_rr_ptr.c"
|
||||
"${LIBRARY_DIR}/udns_rr_srv.c"
|
||||
"${LIBRARY_DIR}/udns_rr_txt.c"
|
||||
"${LIBRARY_DIR}/udns_XtoX.c"
|
||||
"${LIBRARY_DIR}/udns_dn.c"
|
||||
)
|
||||
|
||||
target_compile_definitions(_udns PRIVATE -DHAVE_CONFIG_H)
|
||||
|
@ -439,14 +439,8 @@ if (TARGET ch_contrib::avrocpp)
|
||||
dbms_target_link_libraries(PRIVATE ch_contrib::avrocpp)
|
||||
endif ()
|
||||
|
||||
if (TARGET ch_contrib::udns)
|
||||
target_link_libraries (clickhouse_common_io PRIVATE ch_contrib::udns)
|
||||
endif ()
|
||||
|
||||
|
||||
if (TARGET ch_contrib::cpp-dns)
|
||||
target_link_libraries (clickhouse_common_io PRIVATE ch_contrib::cpp-dns)
|
||||
endif ()
|
||||
target_link_libraries (clickhouse_common_io PRIVATE ch_contrib::udns)
|
||||
target_link_libraries (clickhouse_common_io PRIVATE ch_contrib::cpp-dns)
|
||||
|
||||
if (TARGET OpenSSL::Crypto)
|
||||
dbms_target_link_libraries (PRIVATE OpenSSL::Crypto)
|
||||
|
@ -147,12 +147,12 @@ static std::vector<String> reverseResolveImpl(const Poco::Net::IPAddress & addre
|
||||
|
||||
std::vector<std::string> ptr_records;
|
||||
|
||||
resolver.resolve_a4ptr(boost::asio::ip::address_v4::from_string(address.toString()), [&](int err, auto& hosts, auto&, auto&, uint) {
|
||||
resolver.resolve_a4ptr(boost::asio::ip::address_v4::from_string(address.toString()), [&](int err, auto & hosts, auto &, auto &, uint) {
|
||||
if (err) {
|
||||
throw Exception("Cannot resolve: " + address.toString() + YukiWorkshop::DNSResolver::error_string(err), ErrorCodes::DNS_ERROR);
|
||||
}
|
||||
|
||||
for (auto &it : hosts) {
|
||||
for (auto & it : hosts) {
|
||||
ptr_records.emplace_back(it);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user