aboutsummaryrefslogtreecommitdiff
path: root/src/netbase.cpp
diff options
context:
space:
mode:
authorPieter Wuille <[email protected]>2013-11-10 19:19:30 +0100
committerPieter Wuille <[email protected]>2013-11-10 19:21:03 +0100
commitf76c122e2eac8ef66f69d142231bd33c88a24c50 (patch)
treed2f910390e55aef857023812fbdaefdd66cd99ff /src/netbase.cpp
parentMerge pull request #3211 (diff)
parentCleanup code using forward declarations. (diff)
downloaddiscoin-f76c122e2eac8ef66f69d142231bd33c88a24c50.tar.xz
discoin-f76c122e2eac8ef66f69d142231bd33c88a24c50.zip
Merge pull request #2767
51ed9ec Cleanup code using forward declarations. (Brandon Dahler)
Diffstat (limited to 'src/netbase.cpp')
-rw-r--r--src/netbase.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/netbase.cpp b/src/netbase.cpp
index 36b90e0d4..88c58f854 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -4,9 +4,13 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "netbase.h"
-#include "util.h"
-#include "sync.h"
+
#include "hash.h"
+#include "sync.h"
+#include "uint256.h"
+#include "util.h"
+
+#include <stdint.h>
#ifndef WIN32
#include <fcntl.h>
@@ -15,7 +19,7 @@
#include <boost/algorithm/string/case_conv.hpp> // for to_lower()
#include <boost/algorithm/string/predicate.hpp> // for startswith() and endswith()
-#if !defined(HAVE_MSG_NOSIGNAL)
+#if !defined(HAVE_MSG_NOSIGNAL) && !defined(MSG_NOSIGNAL)
#define MSG_NOSIGNAL 0
#endif
@@ -883,10 +887,10 @@ std::vector<unsigned char> CNetAddr::GetGroup() const
return vchRet;
}
-uint64 CNetAddr::GetHash() const
+uint64_t CNetAddr::GetHash() const
{
uint256 hash = Hash(&ip[0], &ip[16]);
- uint64 nRet;
+ uint64_t nRet;
memcpy(&nRet, &hash, sizeof(nRet));
return nRet;
}