[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fpending Android bug
From: |
Po Lu |
Subject: |
Re: fpending Android bug |
Date: |
Sun, 15 Jan 2023 19:11:13 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Bruno Haible <bruno@clisp.org> writes:
> Ah, now that makes sense: When they moved 'struct __sFILE' out of <stdio.h>
> into <bits/struct_file.h>, they also removed its named fields.
>
> In other words, looking at the timeline of the Android API level 19 support:
> - They added this support in NDK r10e,
> - In NDK r13b the elements of a FILE were accessible,
> - In NDK r14b the elements of a FILE were suddenly not accessible any more.
>
> I'm applying your patch:
>
>
> 2023-01-15 Bruno Haible <bruno@clisp.org>
>
> fpending: Fix compilation error with NDK ≥ r14b and Android API < 23.
> Report and patch by Po Lu <luangruo@yahoo.com>.
> * lib/fpending.c (__fpending) [__ANDROID__]: Use the fp_ macro.
>
> diff --git a/lib/fpending.c b/lib/fpending.c
> index afa840b851..e57155e586 100644
> --- a/lib/fpending.c
> +++ b/lib/fpending.c
> @@ -41,7 +41,7 @@ __fpending (FILE *fp)
> return fp->_IO_write_ptr - fp->_IO_write_base;
> #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
> /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin < 1.7.34, Minix
> 3, Android */
> - return fp->_p - fp->_bf._base;
> + return fp_->_p - fp_->_bf._base;
> #elif defined __EMX__ /* emx+gcc */
> return fp->_ptr - fp->_buffer;
> #elif defined __minix /* Minix */
Thanks, Bruno.