[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: #include <stdio.h> on Android clang causes an error
From: |
Lucy Phipps |
Subject: |
Re: #include <stdio.h> on Android clang causes an error |
Date: |
Tue, 7 Sep 2021 14:18:34 +0100 |
https://github.com/termux/termux-packages/pull/7480 btw. sorry about
typos in the first email
On Tue, Sep 7, 2021 at 2:16 PM Lucy Phipps <landfillbaby69@gmail.com> wrote:
>
> since the official git repo's online viewer doesn't allow blame, the
> commit causing it was 48ece5c3f2185f52ab8cd73ceac9bd9f0e01eac6
>
> On Tue, Sep 7, 2021 at 2:11 PM Lucy Phipps <landfillbaby69@gmail.com> wrote:
> >
> > For example, building gzip 1.11 from the tar.xz source:
> > In file included from
> > /home/builder/.termux-build/gzip/src/lib/freading.c:20:
> > In file included from
> > /home/builder/.termux-build/gzip/src/lib/freading.h:18:
> > In file included from ./stdio.h:43:
> > In file included from
> > /home/builder/.termux-build/_cache/android-r21d-api-24-v5/bin/../sysroot/usr/include/stdio.h:47:
> > In file included from ./string.h:52:
> > In file included from ./stdlib.h:36:
> > In file included from
> > /home/builder/.termux-build/_cache/android-r21d-api-24-v5/bin/../sysroot/usr/include/stdlib.h:34:
> > /home/builder/.termux-build/_cache/android-r21d-api-24-v5/bin/../sysroot/usr/include/malloc.h:168:37:
> > error: unknown type name 'FILE'
> > int malloc_info(int __must_be_zero, FILE* __fp) __INTRODUCED_IN(23);
> >
> > The problem is
> > The patch I ended up using on Termux is very simple, but assumes
> > gnulib didn't replace free()
> > diff --git a/lib/string.in.h b/lib/string.in.h
> > index fa2e40c..46b7a14 100644
> > --- a/lib/string.in.h
> > +++ b/lib/string.in.h
> > @@ -48,7 +48,7 @@
> > #include <stddef.h>
> >
> > /* Get free(). */
> > -#include <stdlib.h>
> > +void free(void *);
> >
> > /* MirBSD defines mbslen as a macro. */
> > #if @GNULIB_MBSLEN@ && defined __MirBSD__
- #include <stdio.h> on Android clang causes an error, Lucy Phipps, 2021/09/07
- Re: #include <stdio.h> on Android clang causes an error, Lucy Phipps, 2021/09/07
- Re: #include <stdio.h> on Android clang causes an error,
Lucy Phipps <=
- Re: #include <stdio.h> on Android clang causes an error, Paul Eggert, 2021/09/08
- Re: #include <stdio.h> on Android clang causes an error, Lucy Phipps, 2021/09/08
- Re: #include <stdio.h> on Android clang causes an error, Paul Eggert, 2021/09/08
- Re: #include <stdio.h> on Android clang causes an error, Lucy Phipps, 2021/09/08
- Re: #include <stdio.h> on Android clang causes an error, Lucy Phipps, 2021/09/08
- Re: #include <stdio.h> on Android clang causes an error, Paul Eggert, 2021/09/09
- Message not available
- Fwd: #include <stdio.h> on Android clang causes an error, Lucy Phipps, 2021/09/09
- Re: #include <stdio.h> on Android clang causes an error, Jim Meyering, 2021/09/09