From 67df296650a72b8769fac58787148080ec771805 Mon Sep 17 00:00:00 2001 From: mydesktop Date: Wed, 30 Apr 2014 13:52:21 -0400 Subject: various fixes to allow mac osx compilation --- src/crypto/oaes_lib.c | 1 + src/cryptonote_core/cryptonote_format_utils.h | 2 +- src/p2p/net_node.inl | 4 +++- src/p2p/p2p_protocol_defs.h | 4 ++-- src/rpc/core_rpc_server.cpp | 2 +- src/simplewallet/simplewallet.cpp | 2 +- 6 files changed, 9 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/crypto/oaes_lib.c b/src/crypto/oaes_lib.c index d77c52f11..126f0a2f6 100644 --- a/src/crypto/oaes_lib.c +++ b/src/crypto/oaes_lib.c @@ -37,6 +37,7 @@ static const char _NR[] = { #include #include #include +#include #ifdef WIN32 #include diff --git a/src/cryptonote_core/cryptonote_format_utils.h b/src/cryptonote_core/cryptonote_format_utils.h index 554e466cc..5873d2943 100644 --- a/src/cryptonote_core/cryptonote_format_utils.h +++ b/src/cryptonote_core/cryptonote_format_utils.h @@ -25,7 +25,7 @@ namespace cryptonote typedef std::pair output_entry; std::vector outputs; //index + key - uint64_t real_output; //index in outputs vector of real output_entry + size_t real_output; //index in outputs vector of real output_entry crypto::public_key real_out_tx_key; //incoming real tx public key size_t real_output_in_tx_index; //index in transaction outputs vector uint64_t amount; //money diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl index eeb3f6ffe..4dafa2342 100644 --- a/src/p2p/net_node.inl +++ b/src/p2p/net_node.inl @@ -745,7 +745,9 @@ namespace nodetool template bool node_server::get_local_node_data(basic_node_data& node_data) { - time(&node_data.local_time); + time_t local_time; + time(&local_time); + node_data.local_time = local_time; node_data.peer_id = m_config.m_peer_id; if(!m_hide_my_port) node_data.my_port = m_external_port ? m_external_port : m_listenning_port; diff --git a/src/p2p/p2p_protocol_defs.h b/src/p2p/p2p_protocol_defs.h index 9994dca4c..fdf784f49 100644 --- a/src/p2p/p2p_protocol_defs.h +++ b/src/p2p/p2p_protocol_defs.h @@ -86,7 +86,7 @@ namespace nodetool struct basic_node_data { uuid network_id; - time_t local_time; + uint64_t local_time; uint32_t my_port; peerid_type peer_id; @@ -153,7 +153,7 @@ namespace nodetool struct response { - time_t local_time; + uint64_t local_time; t_playload_type payload_data; std::list local_peerlist; diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index bab373c86..311d2a145 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -536,7 +536,7 @@ namespace cryptonote if (!have_block) { error_resp.code = CORE_RPC_ERROR_CODE_INTERNAL_ERROR; - error_resp.message = "Internal error: can't get block by height. Height = " + req.height + '.'; + error_resp.message = "Internal error: can't get block by height. Height = " + std::to_string(req.height) + '.'; return false; } bool responce_filled = fill_block_header_responce(blk, false, req.height, block_hash, res.block_header); diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index a4cae0480..a9c171f6b 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -469,7 +469,7 @@ bool simple_wallet::refresh(const std::vector& args) return true; message_writer() << "Starting refresh..."; - uint64_t fetched_blocks = 0; + size_t fetched_blocks = 0; bool ok = false; std::ostringstream ss; try -- cgit v1.2.3