All kernel objects in code shared amongs targets (core, plugins, codecs) should be...
[kugel-rb.git] / apps / plugins / mikmod / strdup.c
blobf8c1438bee6edb0569bb835d4b2e32205f9f4f5d
1 #ifdef HAVE_CONFIG_H
2 #include "config.h"
3 #endif
5 #include <stdlib.h>
6 #include <string.h>
7 #include "mikmod.h"
9 #undef strdup
11 char* strdup(const char *__s)
13 char *charptr;
15 if (!__s)
16 return NULL;
18 charptr=(char *)MikMod_malloc(sizeof(char) * (strlen(__s) + 1));
19 if (charptr)
20 strcpy(charptr, __s);
22 return charptr;