Skip to content

Commit

Permalink
Merge pull request #180 from stoffu/aeon-upstream-7
Browse files Browse the repository at this point in the history
Aeon upstream 7
  • Loading branch information
aeonix authored Jun 4, 2020
2 parents d6276c4 + 3bac43a commit dbfc620
Show file tree
Hide file tree
Showing 13 changed files with 1,341 additions and 55 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,9 @@ else()
add_cxx_flag_if_supported(-mmitigate-rop CXX_SECURITY_FLAGS)
endif()

add_c_flag_if_supported(-mmitigate-rop C_SECURITY_FLAGS)
add_cxx_flag_if_supported(-mmitigate-rop CXX_SECURITY_FLAGS)

# linker
if (NOT (WIN32 AND (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_LESS 9.1)))
# Windows binaries die on startup with PIE when compiled with GCC <9.x
Expand Down
24 changes: 20 additions & 4 deletions contrib/epee/include/net/abstract_tcp_server2.inl
Original file line number Diff line number Diff line change
Expand Up @@ -1115,8 +1115,16 @@ POP_WARNINGS
sock_.open(remote_endpoint.protocol());
if(bind_ip != "0.0.0.0" && bind_ip != "0" && bind_ip != "" )
{
boost::asio::ip::tcp::endpoint local_endpoint(boost::asio::ip::address::from_string(adr.c_str()), 0);
sock_.bind(local_endpoint);
boost::asio::ip::tcp::endpoint local_endpoint(boost::asio::ip::address::from_string(bind_ip.c_str()), 0);
boost::system::error_code ec;
sock_.bind(local_endpoint, ec);
if (ec)
{
MERROR("Error binding to " << bind_ip << ": " << ec.message());
if (sock_.is_open())
sock_.close();
return false;
}
}

/*
Expand Down Expand Up @@ -1221,8 +1229,16 @@ POP_WARNINGS
sock_.open(remote_endpoint.protocol());
if(bind_ip != "0.0.0.0" && bind_ip != "0" && bind_ip != "" )
{
boost::asio::ip::tcp::endpoint local_endpoint(boost::asio::ip::address::from_string(adr.c_str()), 0);
sock_.bind(local_endpoint);
boost::asio::ip::tcp::endpoint local_endpoint(boost::asio::ip::address::from_string(bind_ip.c_str()), 0);
boost::system::error_code ec;
sock_.bind(local_endpoint, ec);
if (ec)
{
MERROR("Error binding to " << bind_ip << ": " << ec.message());
if (sock_.is_open())
sock_.close();
return false;
}
}

boost::shared_ptr<boost::asio::deadline_timer> sh_deadline(new boost::asio::deadline_timer(io_service_));
Expand Down
64 changes: 64 additions & 0 deletions src/blockchain_utilities/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,28 @@ monero_private_headers(blockchain_usage



set(blockchain_ancestry_sources
blockchain_ancestry.cpp
)

set(blockchain_ancestry_private_headers)

monero_private_headers(blockchain_ancestry
${blockchain_ancestry_private_headers})



set(blockchain_depth_sources
blockchain_depth.cpp
)

set(blockchain_depth_private_headers)

monero_private_headers(blockchain_depth
${blockchain_depth_private_headers})



monero_add_executable(blockchain_import
${blockchain_import_sources}
${blockchain_import_private_headers}
Expand Down Expand Up @@ -183,3 +205,45 @@ set_property(TARGET blockchain_usage
OUTPUT_NAME "aeon-blockchain-usage")
install(TARGETS blockchain_usage DESTINATION bin)

monero_add_executable(blockchain_ancestry
${blockchain_ancestry_sources}
${blockchain_ancestry_private_headers})

target_link_libraries(blockchain_ancestry
PRIVATE
cryptonote_core
blockchain_db
version
epee
${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY}
${Boost_THREAD_LIBRARY}
${CMAKE_THREAD_LIBS_INIT}
${EXTRA_LIBRARIES})

set_property(TARGET blockchain_ancestry
PROPERTY
OUTPUT_NAME "aeon-blockchain-ancestry")
install(TARGETS blockchain_ancestry DESTINATION bin)

monero_add_executable(blockchain_depth
${blockchain_depth_sources}
${blockchain_depth_private_headers})

target_link_libraries(blockchain_depth
PRIVATE
cryptonote_core
blockchain_db
version
epee
${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY}
${Boost_THREAD_LIBRARY}
${CMAKE_THREAD_LIBS_INIT}
${EXTRA_LIBRARIES})

set_property(TARGET blockchain_depth
PROPERTY
OUTPUT_NAME "aeon-blockchain-depth")
install(TARGETS blockchain_depth DESTINATION bin)

Loading

0 comments on commit dbfc620

Please sign in to comment.