Hi, Po Lu wrote: > With the build API version set to 21 on the NDK r26b, vasnprintf.c needs > to include: > > #include <wchar.h> > > or else it cannot find mbstate_t.
Thanks for the report. This patch should fix it. 2023-01-25 Bruno Haible <br...@clisp.org> vasnprintf: Fix compilation error on Android NDK r26b. Reported by Po Lu <luang...@yahoo.com>. * lib/vasnprintf.c: Include <wchar.h>. diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c index ab11ad026e..277c39e3e0 100644 --- a/lib/vasnprintf.c +++ b/lib/vasnprintf.c @@ -83,6 +83,7 @@ #include <stdio.h> /* snprintf(), sprintf() */ #include <stdlib.h> /* abort(), malloc(), realloc(), free() */ #include <string.h> /* memcpy(), strlen() */ +#include <wchar.h> /* mbstate_t, mbrtowc(), mbrlen(), wcrtomb() */ #include <errno.h> /* errno */ #include <limits.h> /* CHAR_BIT */ #include <float.h> /* DBL_MAX_EXP, LDBL_MAX_EXP */