Skip to content

Commit

Permalink
Merge pull request #263 from graft-project/fix/osx-build
Browse files Browse the repository at this point in the history
Fix compilation errors for cryptonode on OSX
  • Loading branch information
mbg033 authored Mar 20, 2019
2 parents eaa69c6 + 13c2014 commit 1212969
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,9 @@ else()
include(TestCXXAcceptsFlag)
set(ARCH native CACHE STRING "CPU to build for: -march value or 'default' to not pass -march at all")
message(STATUS "Building on ${CMAKE_SYSTEM_PROCESSOR} for ${ARCH}")
if(APPLE)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lz")
endif()
if(ARCH STREQUAL "default")
set(ARCH_FLAG "")
elseif(PPC64LE)
Expand Down
2 changes: 1 addition & 1 deletion src/debug_utilities/daa_process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class DAA_Tester
size_t begin, end;
if (m_counter < DIFFICULTY_WINDOW + DIFFICULTY_LAG) {
begin = 0;
end = min(m_counter, (size_t) DIFFICULTY_WINDOW);
end = min(m_counter, (uint64_t) DIFFICULTY_WINDOW);
} else {
end = m_counter - DIFFICULTY_LAG;
begin = end - DIFFICULTY_WINDOW;
Expand Down
2 changes: 1 addition & 1 deletion src/p2p/net_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ namespace nodetool
typename request_struct::response resp = AUTO_VAL_INIT(resp);
bool r = epee::net_utils::invoke_http_json(m_supernode_uri + uri,
req, resp, m_supernode_client,
std::chrono::milliseconds(SUPERNODE_HTTP_TIMEOUT_MILLIS), "POST");
std::chrono::milliseconds(size_t(SUPERNODE_HTTP_TIMEOUT_MILLIS)), "POST");
if (!r || resp.status == 0)
{
return 0;
Expand Down
2 changes: 1 addition & 1 deletion src/p2p/net_node.inl
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ namespace nodetool
{
for (const auto& na : m_custom_seed_nodes)
{
const auto& ipv4 = na.as<const epee::net_utils::ipv4_network_address>();
const auto& ipv4 = na.template as<const epee::net_utils::ipv4_network_address>();
full_addrs.insert(epee::string_tools::get_ip_string_from_int32(ipv4.ip()) + ":"
+ epee::string_tools::num_to_string_fast(ipv4.port()) );
}
Expand Down

0 comments on commit 1212969

Please sign in to comment.