diff --git a/Encrypt/Encrypt.cpp b/Encrypt/Encrypt.cpp index 37bc3eb..47bee2a 100644 --- a/Encrypt/Encrypt.cpp +++ b/Encrypt/Encrypt.cpp @@ -43,8 +43,11 @@ std::string Encrypt::sha1sum(const std::string_view &data, Sha1DigestType &diges std::string Encrypt::sha1sum(const char *data, size_t size, Sha1DigestType &digest) { boost::uuids::detail::sha1 sha1; sha1.process_bytes(data, size); +#if BOOST_VERSION < 108600 + sha1.get_digest(*reinterpret_cast(&digest)); +#else sha1.get_digest(digest); - +#endif std::ostringstream oss; for (int i = 0; i < 5; ++i) oss << std::hex << std::setfill('0') << std::setw(8) << digest[i]; diff --git a/Universal/IoContext.cpp b/Universal/IoContext.cpp index 967d46b..5778b2c 100644 --- a/Universal/IoContext.cpp +++ b/Universal/IoContext.cpp @@ -24,7 +24,11 @@ void IoContext::runIoContext() { } catch (const boost::exception &e) { LOG(error) << boost::diagnostic_information(e); } catch (const std::exception &e) { +#if BOOST_VERSION < 108600 + LOG(error) << e.what(); +#else boost::stacktrace::stacktrace trace = boost::stacktrace::stacktrace::from_current_exception(); LOG(error) << e.what() << ", trace:\n" << trace; +#endif } }