diff --git a/ndn-cpp/encoding/BinaryXMLStructureDecoder.c b/ndn-cpp/encoding/BinaryXMLStructureDecoder.c
index 0d53a3b..e29515d 100644
--- a/ndn-cpp/encoding/BinaryXMLStructureDecoder.c
+++ b/ndn-cpp/encoding/BinaryXMLStructureDecoder.c
@@ -4,7 +4,7 @@
  * BSD license, See the LICENSE file for more information.
  */
 
-#include <memory.h>
+#include "../util/ndn_memory.h"
 #include "BinaryXML.h"
 #include "BinaryXMLDecoder.h"
 #include "BinaryXMLStructureDecoder.h"
@@ -30,12 +30,12 @@
   self->state = ndn_BinaryXMLStructureDecoder_READ_HEADER_OR_CLOSE;    
 }
 
-const char *ndn_BinaryXMLStructureDecoder_findElementEnd
-  (struct ndn_BinaryXMLStructureDecoder *self, const unsigned char *input, unsigned int inputLength) 
+char *ndn_BinaryXMLStructureDecoder_findElementEnd
+  (struct ndn_BinaryXMLStructureDecoder *self, unsigned char *input, unsigned int inputLength) 
 {
   if (self->gotElementEnd)
     // Someone is calling when we already got the end.
-    return (const char *)0;
+    return (char *)0;
   
   struct ndn_BinaryXMLDecoder decoder;
   ndn_BinaryXMLDecoder_init(&decoder, input, inputLength);
@@ -43,7 +43,7 @@
   while (1) {
     if (self->offset >= inputLength)
       // All the cases assume we have some input. Return and wait for more.
-      return (const char *)0;
+      return (char *)0;
     
     if (self->state == ndn_BinaryXMLStructureDecoder_READ_HEADER_OR_CLOSE) {
       // First check for CLOSE.
@@ -54,7 +54,7 @@
         if (self->level == 0) {
           // Finished.
           self->gotElementEnd = 1;
-          return (const char *)0;
+          return (char *)0;
         }
         if (self->level < 0)
           return "ndn_BinaryXMLStructureDecoder_findElementEnd: Unexpected close tag";
@@ -72,9 +72,9 @@
             return "ndn_BinaryXMLStructureDecoder_findElementEnd: Can't store more header bytes than the size of headerBuffer";
           self->useHeaderBuffer = 1;
           unsigned int nNewBytes = self->headerLength - startingHeaderLength;
-          memcpy(self->headerBuffer + startingHeaderLength, input + (self->offset - nNewBytes), nNewBytes);
+          ndn_memcpy(self->headerBuffer + startingHeaderLength, input + (self->offset - nNewBytes), nNewBytes);
             
-          return (const char *)0;
+          return (char *)0;
         }
         unsigned int headerByte = (unsigned int)input[self->offset++];
         ++self->headerLength;
@@ -90,7 +90,7 @@
         if (self->headerLength > sizeof(self->headerBuffer))
           return "ndn_BinaryXMLStructureDecoder_findElementEnd: Can't store more header bytes than the size of headerBuffer";
         unsigned int nNewBytes = self->headerLength - startingHeaderLength;
-        memcpy(self->headerBuffer + startingHeaderLength, input + (self->offset - nNewBytes), nNewBytes);
+        ndn_memcpy(self->headerBuffer + startingHeaderLength, input + (self->offset - nNewBytes), nNewBytes);
 
         // Use a local decoder just for the headerBuffer.
         struct ndn_BinaryXMLDecoder bufferDecoder;
@@ -137,7 +137,7 @@
         // Need more.
         self->offset += nRemainingBytes;
         self->nBytesToRead -= nRemainingBytes;
-        return (const char *)0;
+        return (char *)0;
       }
       // Got the bytes. Read a new header or close.
       self->offset += self->nBytesToRead;
diff --git a/ndn-cpp/util/ndn_memory.c b/ndn-cpp/util/ndn_memory.c
new file mode 100644
index 0000000..5863d44
--- /dev/null
+++ b/ndn-cpp/util/ndn_memory.c
@@ -0,0 +1,27 @@
+/* 
+ * Author: Jeff Thompson
+ *
+ * BSD license, See the LICENSE file for more information.
+ */
+
+#include "ndn_memory.h"
+
+#if !HAVE_MEMCPY
+void ndn_memcpy(unsigned char *dest, unsigned char *src, unsigned int len)
+{
+  unsigned int i;
+  
+  for (i = 0; i < len; i++)
+    dest[i] = src[i];
+}
+#endif
+
+#if !HAVE_MEMSET
+void ndn_memset(unsigned char *dest, int val, unsigned int len)
+{
+  unsigned int i;
+  
+  for (i = 0; i < len; i++)
+    dest[i] = (unsigned char)val;
+}
+#endif
\ No newline at end of file
diff --git a/ndn-cpp/util/ndn_memory.h b/ndn-cpp/util/ndn_memory.h
new file mode 100644
index 0000000..07bd24c
--- /dev/null
+++ b/ndn-cpp/util/ndn_memory.h
@@ -0,0 +1,51 @@
+/* 
+ * Author: Jeff Thompson
+ *
+ * BSD license, See the LICENSE file for more information.
+ */
+
+/*
+ * Based on HAVE_MEMCPY and HAVE_MEMSET in config.h, use the library version or a local implementation of memcpy and memset.
+ */
+
+#ifndef NDN_MEMORY_H
+#define	NDN_MEMORY_H
+
+#include "../../config.h"
+
+#ifdef	__cplusplus
+extern "C" {
+#endif
+
+#if HAVE_MEMCPY
+#include <memory.h>
+/**
+ * Use the library version of memcpy.
+ */
+static inline void ndn_memcpy(unsigned char *dest, unsigned char *src, unsigned int len) { memcpy(dest, src, len); }
+#else
+/**
+ * Use a local implementation of memcpy instead of the library version.
+ */
+void ndn_memcpy(unsigned char *dest, unsigned char *src, unsigned int len);
+#endif
+
+#if HAVE_MEMSET
+#include <memory.h>
+/**
+ * Use the library version of memset.
+ */
+static inline void ndn_memset(unsigned char *dest, int val, unsigned int len) { memset(dest, val, len); }
+#else
+/**
+ * Use a local implementation of memset instead of the library version.
+ */
+void ndn_memset(unsigned char *dest, int val, unsigned int len);
+#endif
+
+#ifdef	__cplusplus
+}
+#endif
+
+#endif
+
