Chg: android adaptions from @xianglin1998

This commit is contained in:
iceman1001 2020-04-16 16:46:09 +02:00
commit 1bf32aad90
4 changed files with 18 additions and 6 deletions

View file

@ -35,7 +35,8 @@
#if defined(__unix__) || defined(__APPLE__)
# include <unistd.h>
#endif
#ifdef __APPLE__
#ifdef __APPLE__ || defined(__ANDROID__) || defined(ANDROID)
typedef int RetType;
typedef int LenType;
#elif __GLIBC__
@ -101,7 +102,7 @@ FILE *open_memstream(char **bufptr, size_t *lenptr) {
*bufptr = NULL;
*lenptr = 0;
#ifdef __APPLE__
#ifdef __APPLE__ || defined(__ANDROID__) || defined(ANDROID)
return funopen(b, NULL, write_to_buffer, NULL, close_buffer);
#elif __GLIBC__
static const cookie_io_functions_t vtable = {