From 277a8edd2e772c9766f6bf577a55b8fd1fce43c4 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 12 Oct 2011 19:18:05 -0700 Subject: [PATCH] Android defines wctomb but doesn't provide it --- libraries/libldap/utf-8-conv.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/libldap/utf-8-conv.c b/libraries/libldap/utf-8-conv.c index d6bfb64883..5562ad64be 100644 --- a/libraries/libldap/utf-8-conv.c +++ b/libraries/libldap/utf-8-conv.c @@ -328,6 +328,10 @@ ldap_x_wcs_to_utf8s ( char *utf8str, const wchar_t *wcstr, size_t count ) return (p - utf8str); } +#ifdef ANDROID +int wctomb(char *s, wchar_t wc) { return wcrtomb(s,wc,NULL); } +int mbtowc(wchar_t *pwc, const char *s, size_t n) { return mbrtowc(pwc, s, n, NULL); } +#endif /*----------------------------------------------------------------------------- Convert a UTF-8 character to a MultiByte character. -- 2.39.5