Fix "Arcadia" build

This commit is contained in:
Alexey Milovidov 2020-08-11 00:36:49 +03:00
parent 09d30a3699
commit 42ecf91df1
2 changed files with 6 additions and 6 deletions

View File

@ -9,7 +9,10 @@
#include <Common/Exception.h>
#include <common/setTerminalEcho.h>
#include <ext/scope_guard.h>
#include <readpassphrase.h>
#if !defined(ARCADIA_BUILD)
#include <readpassphrase.h> // Y_IGNORE
#endif
namespace DB
{
@ -49,10 +52,12 @@ ConnectionParameters::ConnectionParameters(const Poco::Util::AbstractConfigurati
}
if (password_prompt)
{
#if !defined(ARCADIA_BUILD)
std::string prompt{"Password for user (" + user + "): "};
char buf[1000] = {};
if (auto * result = readpassphrase(prompt.c_str(), buf, sizeof(buf), 0))
password = result;
#endif
}
compression = config.getBool("compression", true) ? Protocol::Compression::Enable : Protocol::Compression::Disable;

View File

@ -6,14 +6,9 @@ CFLAGS(
-DENABLE_CLICKHOUSE_SERVER
)
ADDINCL (
GLOBAL clickhouse/base/readpassphrase
)
PEERDIR(
clickhouse/base/daemon
clickhouse/base/loggers
clickhouse/base/readpassphrase
clickhouse/src
)