bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Po Lu <luangruo@yahoo.com>
To: bug-gnulib@gnu.org
Subject: fpending Android bug
Date: Sat, 14 Jan 2023 22:24:28 +0800	[thread overview]
Message-ID: <87wn5pb3dv.fsf@yahoo.com> (raw)
In-Reply-To: 87wn5pb3dv.fsf.ref@yahoo.com

I think I now have the right fix for the fpending bug on Android.
Google is very adamant that you should not do this, however, and they
make no guarantee about the layout of the structure remaining as it is
in the future.

diff --git a/xcompile/lib/fpending.c b/xcompile/lib/fpending.c
index afa840b8512..e57155e586e 100644
--- a/xcompile/lib/fpending.c
+++ b/xcompile/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 */

       reply	other threads:[~2023-01-14 14:25 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 ` Po Lu [this message]
2023-01-14 17:07   ` fpending Android bug 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
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:

  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=87wn5pb3dv.fsf@yahoo.com \
    --to=luangruo@yahoo.com \
    --cc=bug-gnulib@gnu.org \


* 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).