summaryrefslogtreecommitdiff
path: root/lib/stdio-impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/stdio-impl.h')
-rw-r--r--lib/stdio-impl.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/stdio-impl.h b/lib/stdio-impl.h
index b2b2971f2ff..4260468b612 100644
--- a/lib/stdio-impl.h
+++ b/lib/stdio-impl.h
@@ -61,6 +61,11 @@
# define _r pub._r
# define _w pub._w
# elif defined __ANDROID__ /* Android */
+# ifdef __LP64__
+# define _gl_flags_file_t int
+# else
+# define _gl_flags_file_t short
+# endif
/* Up to this commit from 2015-10-12
<https://android.googlesource.com/platform/bionic.git/+/f0141dfab10a4b332769d52fa76631a64741297a>
the innards of FILE were public, and fp_ub could be defined like for OpenBSD,
@@ -70,8 +75,8 @@
# define fp_ ((struct { unsigned char *_p; \
int _r; \
int _w; \
- int _flags; \
- int _file; \
+ _gl_flags_file_t _flags; \
+ _gl_flags_file_t _file; \
struct { unsigned char *_base; size_t _size; } _bf; \
int _lbfsize; \
void *_cookie; \