diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-05-17 23:56:47 +0000 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-05-17 23:56:47 +0000 |
commit | 2810cd7c156393f62c36ae01ba8099766e8dc777 (patch) | |
tree | ecdb96064384d633804e486c2224962fa78bf18c /node/InetAddress.cpp | |
parent | 0af18b164c0290b4cf65ffcf388563c330d18239 (diff) | |
download | infinitytier-2810cd7c156393f62c36ae01ba8099766e8dc777.tar.gz infinitytier-2810cd7c156393f62c36ae01ba8099766e8dc777.zip |
Build fixes for G++, building without SQLite3 present, and warning removal.
Diffstat (limited to 'node/InetAddress.cpp')
-rw-r--r-- | node/InetAddress.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/node/InetAddress.cpp b/node/InetAddress.cpp index 54fc763f..940a58b2 100644 --- a/node/InetAddress.cpp +++ b/node/InetAddress.cpp @@ -137,8 +137,7 @@ void InetAddress::set(const void *ipBytes,unsigned int ipLen,unsigned int port) reinterpret_cast<struct sockaddr_in *>(this)->sin_port = Utils::hton((uint16_t)port); } else if (ipLen == 16) { ss_family = AF_INET6; - (reinterpret_cast<uint64_t *>(reinterpret_cast<struct sockaddr_in6 *>(this)->sin6_addr.s6_addr))[0] = ((const uint64_t *)ipBytes)[0]; - (reinterpret_cast<uint64_t *>(reinterpret_cast<struct sockaddr_in6 *>(this)->sin6_addr.s6_addr))[1] = ((const uint64_t *)ipBytes)[1]; + memcpy(reinterpret_cast<struct sockaddr_in6 *>(this)->sin6_addr.s6_addr,ipBytes,16); reinterpret_cast<struct sockaddr_in6 *>(this)->sin6_port = Utils::hton((uint16_t)port); } } |