mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Force use of c-ares inet_net_pton and style adjustments
This commit is contained in:
parent
395dada988
commit
7f4043a3ed
@ -27,10 +27,9 @@ if (NOT CMAKE_SYSTEM_NAME STREQUAL "SunOS")
|
||||
set(HAVE_LIBNSL OFF CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
|
||||
# Force use of c-ares inet_net_pton instead of libresolv one
|
||||
set(HAVE_INET_NET_PTON OFF CACHE BOOL "" FORCE)
|
||||
|
||||
add_subdirectory("../c-ares/" "../c-ares/")
|
||||
|
||||
add_library(ch_contrib::c-ares ALIAS c-ares)
|
||||
|
||||
find_library(LIBRESOLV_LIBRARY NAMES resolv libresolv REQUIRED)
|
||||
|
||||
target_link_libraries(c-ares PRIVATE ${LIBRESOLV_LIBRARY})
|
||||
add_library(ch_contrib::c-ares ALIAS c-ares)
|
@ -3,7 +3,8 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace DB {
|
||||
namespace DB
|
||||
{
|
||||
struct DNSPTRResolver
|
||||
{
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
#include "DNSPTRResolverProvider.h"
|
||||
#include "CaresPTRResolver.h"
|
||||
|
||||
namespace DB {
|
||||
namespace DB
|
||||
{
|
||||
std::shared_ptr<DNSPTRResolver> DNSPTRResolverProvider::get()
|
||||
{
|
||||
static auto cares_resolver = std::make_shared<CaresPTRResolver>(
|
||||
|
@ -3,7 +3,8 @@
|
||||
#include <memory>
|
||||
#include "DNSPTRResolver.h"
|
||||
|
||||
namespace DB {
|
||||
namespace DB
|
||||
{
|
||||
/*
|
||||
* Provides a ready-to-use DNSPTRResolver instance.
|
||||
* It hides 3rd party lib dependencies, handles initialization and lifetime.
|
||||
|
Loading…
Reference in New Issue
Block a user