]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[master] add std:: for memcpy. need this for sunstudio/solaris to build.
authorJINMEI Tatuya <jinmei@isc.org>
Mon, 29 Oct 2012 20:45:06 +0000 (20:45 +0000)
committerJINMEI Tatuya <jinmei@isc.org>
Mon, 29 Oct 2012 20:45:06 +0000 (20:45 +0000)
src/lib/dhcp/alloc_engine.cc

index 5e8d90d1eac548f0aaf35c44aca3a57f990f27f4..8ebefdcc9253fdf3bc7cfa8ebe07575722824757 100644 (file)
@@ -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;
     }