summaryrefslogtreecommitdiffstats
path: root/lib/libc-headless/string/memcpy.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc-headless/string/memcpy.c')
-rw-r--r--lib/libc-headless/string/memcpy.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/libc-headless/string/memcpy.c b/lib/libc-headless/string/memcpy.c
new file mode 100644
index 0000000..f71444d
--- /dev/null
+++ b/lib/libc-headless/string/memcpy.c
@@ -0,0 +1,10 @@
+#include <stddef.h>
+
+void*
+memcpy(void *dest, const void *src, size_t n)
+{
+ const unsigned char *s = src;
+ for(unsigned char *d = dest; n; n--)
+ *(d++) = *(s++);
+ return dest;
+}