blob: 0aa36f71c1668014ff50d8544eb4597b3dc09560 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
|
#include <mlibc/string.h>
#include <mlibc/stdlib.h>
char *strdup(const char *orig)
{
size_t s_orig = strlen(orig);
char *ret = kmalloc(s_orig + 1);
strcpy(ret, orig);
return ret;
}
|