From 3fb0bdff15cd4c87d97a217a9b746aac724a8c0f Mon Sep 17 00:00:00 2001 From: levlam Date: Sat, 8 Aug 2020 21:56:34 +0300 Subject: [PATCH] tg_cli: fix OpenSSL initialization. GitOrigin-RevId: 388f70155c7f3a1f5276886c1cb38131dd302adc --- td/telegram/cli.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/td/telegram/cli.cpp b/td/telegram/cli.cpp index 4f6e616c8..0ab154afb 100644 --- a/td/telegram/cli.cpp +++ b/td/telegram/cli.cpp @@ -18,6 +18,7 @@ #include "td/utils/base64.h" #include "td/utils/buffer.h" #include "td/utils/common.h" +#include "td/utils/crypto.h" #include "td/utils/FileLog.h" #include "td/utils/format.h" #include "td/utils/JsonBuilder.h" @@ -4333,8 +4334,9 @@ void main(int argc, char **argv) { set_signal_handler(SignalType::Error, fail_signal).ensure(); set_signal_handler(SignalType::Abort, fail_signal).ensure(); Log::set_fatal_error_callback(on_fatal_error); + init_openssl_threads(); - const char *locale_name = (std::setlocale(LC_ALL, "fr-FR") == nullptr ? "" : "fr-FR"); + const char *locale_name = (std::setlocale(LC_ALL, "fr-FR") == nullptr ? "C" : "fr-FR"); std::locale new_locale(locale_name); std::locale::global(new_locale); SCOPE_EXIT {