mirror of
https://github.com/UzixLS/KernelEx.git
synced 2025-07-18 23:11:19 +03:00
17 lines
233 B
C
Executable File
17 lines
233 B
C
Executable File
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
char *strdup(const char *str)
|
|
{
|
|
char *newstr;
|
|
|
|
if (!str)
|
|
return NULL;
|
|
|
|
newstr = (char *) malloc(strlen(str) + 1);
|
|
if (newstr)
|
|
strcpy(newstr, str);
|
|
|
|
return newstr;
|
|
}
|