aboutsummaryrefslogtreecommitdiff
path: root/src/userspace/mlibc/string/strdup.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/userspace/mlibc/string/strdup.c')
-rw-r--r--src/userspace/mlibc/string/strdup.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/userspace/mlibc/string/strdup.c b/src/userspace/mlibc/string/strdup.c
new file mode 100644
index 0000000..bb3597d
--- /dev/null
+++ b/src/userspace/mlibc/string/strdup.c
@@ -0,0 +1,11 @@
+#include <mlibc/string.h>
+#include <mlibc/stdlib.h>
+
+char *strdup(const char *orig)
+{
+ // size_t s_orig = strlen(orig);
+ char *ret = 0;
+ // kmalloc(s_orig + 1);
+ strcpy(ret, orig);
+ return ret;
+} \ No newline at end of file