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. In addition, this warning is still emitted by Clang: ANDROID_CC vasnprintf.o vasnprintf.c:2416:21: warning: variable 'flags' set but not used [-Wunused-but-set-variable] int flags = dp->flags;