Merge pull request #1439 from jagerman/macos-time-fix

macOS build fix
This commit is contained in:
Sean 2021-04-19 15:48:15 +10:00 committed by GitHub
commit 2047edcd79
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View file

@ -3035,7 +3035,9 @@ namespace cryptonote { namespace rpc {
std::chrono::steady_clock::time_point steady_now) {
if (t == service_nodes::NEVER)
return 0;
return std::chrono::system_clock::to_time_t(system_now + (t - steady_now));
return std::chrono::system_clock::to_time_t(
std::chrono::time_point_cast<std::chrono::system_clock::duration>(
system_now + (t - steady_now)));
}
//------------------------------------------------------------------------------------------------------------------------------

View file

@ -63,7 +63,7 @@ namespace cryptonote::rpc {
std::vector<std::tuple<std::string, uint16_t, bool>> bind // {IP,port,required}
);
~http_server();
~http_server() override;
/// Starts the event loop in the thread handling http requests. Core must have been initialized
/// and OxenMQ started. Will propagate an exception from the thread if startup fails.

View file

@ -64,6 +64,8 @@ namespace cryptonote::rpc {
protected:
virtual ~http_server_base() = default;
virtual void create_rpc_endpoints(uWS::App& http) = 0;
/// handles cors headers by adding any needed headers to the given vector