summaryrefslogtreecommitdiff
path: root/lib/string/bcopy.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/string/bcopy.c')
-rw-r--r--lib/string/bcopy.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/string/bcopy.c b/lib/string/bcopy.c
new file mode 100644
index 0000000..25e98a2
--- /dev/null
+++ b/lib/string/bcopy.c
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: MIT */
+/* Derived from musl libc (Copyright © 2005-2020 Rich Felker, et al.) */
+
+#define _BSD_SOURCE
+#include <string.h>
+#include <strings.h>
+
+void bcopy(const void *s1, void *s2, size_t n)
+{
+ memmove(s2, s1, n);
+}