blob: f40e8755a0357ec91f4dcd2d7353812e9e8afd69 [file] [log] [blame]
#include <stdlib.h>
#include <string.h>
#undef strdup
char* strdup(const char *s)
{
size_t len = strlen (s) + 1;
void *new = malloc (len);
if (new == NULL)
return NULL;
return (char *) memcpy (new, s, len);
}