@@ -129,5 +129,19 @@ abort(); #endif OF_UNREACHABLE } + +static char * +objc_strdup(const char *string) +{ + char *copy; + size_t length = strlen(string); + + if ((copy = (char *)malloc(length + 1)) == NULL) + return NULL; + + memcpy(copy, string, length + 1); + + return copy; +}