Browse Source

[master] add std:: for memcpy. need this for sunstudio/solaris to build.

JINMEI Tatuya 12 years ago
parent
commit
7ec750c09a
1 changed files with 4 additions and 2 deletions
  1. 4 2
      src/lib/dhcp/alloc_engine.cc

+ 4 - 2
src/lib/dhcp/alloc_engine.cc

@@ -14,6 +14,8 @@
 
 #include <alloc_engine.h>
 
+#include <cstring>
+
 using namespace isc::asiolink;
 
 namespace isc {
@@ -31,11 +33,11 @@ AllocEngine::IterativeAllocator::increaseAddress(const isc::asiolink::IOAddress&
     // First we copy the whole address as 16 bytes.
     if (addr.getFamily()==AF_INET) {
         // IPv4
-        memcpy(packed, addr.getAddress().to_v4().to_bytes().data(), 4);
+        std::memcpy(packed, addr.getAddress().to_v4().to_bytes().data(), 4);
         len = 4;
     } else {
         // IPv6
-        memcpy(packed, addr.getAddress().to_v6().to_bytes().data(), 16);
+        std::memcpy(packed, addr.getAddress().to_v6().to_bytes().data(), 16);
         len = 16;
     }