Merge pull request #649 from mfleisz/master

winpr-crt: Fixed compilation errors in _wcsdup on Android
This commit is contained in:
Marc-André Moreau 2012-07-04 08:25:44 -07:00
commit 7fe240df11
1 changed files with 3 additions and 3 deletions

View File

@ -50,11 +50,11 @@ WCHAR* _wcsdup(const WCHAR* strSource)
#if sun
strDestination = wsdup(strSource);
#elif defined(__APPLE__) && defined(__MACH__)
strDestination = malloc(wcslen(strSource));
#elif defined(__APPLE__) && defined(__MACH__) || defined(ANDROID)
strDestination = malloc(wcslen((wchar_t*)strSource));
if (strDestination != NULL)
wcscpy(strDestination, strSource);
wcscpy((wchar_t*)strDestination, (const wchar_t*)strSource);
#else
strDestination = (WCHAR*) wcsdup((wchar_t*) strSource);
#endif