Mercurial > hg > sv-dependency-builds
diff src/libvorbis-1.3.3/macos/compat/strdup.c @ 86:98c1576536ae
Bring in flac, ogg, vorbis
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Tue, 19 Mar 2013 17:37:49 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/libvorbis-1.3.3/macos/compat/strdup.c Tue Mar 19 17:37:49 2013 +0000 @@ -0,0 +1,21 @@ +#include <ogg/os_types.h> +#include <sys/types.h> +#include <string.h> +#include <stdlib.h> + +char *strdup(const char *inStr) +{ + char *outStr = NULL; + + if (inStr == NULL) { + return NULL; + } + + outStr = _ogg_malloc(strlen(inStr) + 1); + + if (outStr != NULL) { + strcpy(outStr, inStr); + } + + return outStr; +}