Fixed missing symbol wctomb in libX11.a

This commit is contained in:
Sergii Pylypenko
2019-02-25 18:27:55 +02:00
parent 4fffca33f3
commit 7fc9a220e0
2 changed files with 22 additions and 1 deletions

View File

@@ -416,7 +416,7 @@ autoreconf -v --install \
env CFLAGS="-isystem$BUILDDIR/usr/include \ env CFLAGS="-isystem$BUILDDIR/usr/include \
-isystem$BUILDDIR/../android-shmem \ -isystem$BUILDDIR/../android-shmem \
-include strings.h" \ -I$BUILDDIR/.." \
LDFLAGS="-L$BUILDDIR" \ LDFLAGS="-L$BUILDDIR" \
$BUILDDIR/setCrossEnvironment.sh \ $BUILDDIR/setCrossEnvironment.sh \
LIBS="-lXau -lXdmcp -landroid_support -landroid-shmem" \ LIBS="-lXau -lXdmcp -landroid_support -landroid-shmem" \

View File

@@ -0,0 +1,21 @@
#include <wchar.h>
#include <stdlib.h>
/* Copied from Bionic libc */
static int
replacement_wctomb(char *s, wchar_t wchar)
{
static mbstate_t mbs;
size_t rval;
if (s == NULL) {
/* No support for state dependent encodings. */
memset(&mbs, 0, sizeof(mbs));
return (0);
}
if ((rval = wcrtomb(s, wchar, &mbs)) == (size_t)-1)
return (-1);
return ((int)rval);
}
#define wctomb replacement_wctomb