bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Po Lu <luangruo@yahoo.com>
To: Bruno Haible <bruno@clisp.org>
Cc: bug-gnulib@gnu.org
Subject: Re: fpending Android bug
Date: Sun, 15 Jan 2023 19:11:13 +0800	[thread overview]
Message-ID: <87zgak9hny.fsf@yahoo.com> (raw)
In-Reply-To: <5411576.7OPFtVAQ6q@nimes> (Bruno Haible's message of "Sun, 15 Jan 2023 11:10:49 +0100")

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.


  reply	other threads:[~2023-01-15 11:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87wn5pb3dv.fsf.ref@yahoo.com>
2023-01-14 14:24 ` fpending Android bug Po Lu
2023-01-14 17:07   ` Bruno Haible
2023-01-14 17:12     ` Bruno Haible
2023-01-15  0:28     ` Po Lu
2023-01-15 10:10       ` Bruno Haible
2023-01-15 11:11         ` Po Lu [this message]
2023-01-17 16:10         ` Bruno Haible

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zgak9hny.fsf@yahoo.com \
    --to=luangruo@yahoo.com \
    --cc=bruno@clisp.org \
    --cc=bug-gnulib@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).