From 2130e897a0c31e957686a74e54791ea91b98035a Mon Sep 17 00:00:00 2001 From: Martin Fleisz Date: Wed, 4 Jul 2012 03:28:04 -0700 Subject: [PATCH] winpr-crt: Fixed compilation errors in _wcsdup on Android --- winpr/crt/string.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/winpr/crt/string.c b/winpr/crt/string.c index 5415bb5a3..920b58639 100644 --- a/winpr/crt/string.c +++ b/winpr/crt/string.c @@ -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