diff options
Diffstat (limited to 'src/core/string.c')
| -rw-r--r-- | src/core/string.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/core/string.c b/src/core/string.c index 856f955b6..da35e208b 100644 --- a/src/core/string.c +++ b/src/core/string.c @@ -21,8 +21,9 @@ * reentrant and should be faster). Use only strsep() in new code, please. */ -#include "etherboot.h" - +#include <stdint.h> +#include <stdlib.h> +#include <string.h> /* *** FROM string.c *** */ @@ -538,3 +539,10 @@ void * memchr(const void *s, int c, size_t n) } #endif + +char * strdup(const char *s) { + char *new = malloc(strlen(s)+1); + if (new) + strcpy(new,s); + return new; +} |
