From 8bec309111411a2fdb51f149af2ff4d8d5226dfd Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 15 Jan 2023 11:10:09 +0100 Subject: [PATCH] =?utf8?q?fpending:=20Fix=20compilation=20error=20with=20N?= =?utf8?q?DK=20=E2=89=A5=20r14b=20and=20Android=20API=20<=2023.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Report and patch by Po Lu . * lib/fpending.c (__fpending) [__ANDROID__]: Use the fp_ macro. --- ChangeLog | 6 ++++++ lib/fpending.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index fa684131db..0dedc0c7d6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2023-01-15 Bruno Haible + + fpending: Fix compilation error with NDK ≥ r14b and Android API < 23. + Report and patch by Po Lu . + * lib/fpending.c (__fpending) [__ANDROID__]: Use the fp_ macro. + 2023-01-14 Paul Eggert alignof: port to strict C23 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 */ -- 2.39.5