blob: f2a7c3505c55b3a367604cf08ef45ef2ae65d923 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
char *strdup(char *orig)
{
u8 s_orig = strlen(orig);
char *ret = (char *)malloc(s_orig + 1);
strcpy(ret, orig);
return ret;
}
|