From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 379DE1F8C6 for ; Tue, 7 Sep 2021 14:39:14 +0000 (UTC) Received: from localhost ([::1]:35018 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNcFk-0006GK-Tn for normalperson@yhbt.net; Tue, 07 Sep 2021 10:39:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41610) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNazw-0001oJ-Tj for bug-gnulib@gnu.org; Tue, 07 Sep 2021 09:18:48 -0400 Received: from mail-io1-xd34.google.com ([2607:f8b0:4864:20::d34]:38442) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mNazv-00048f-8d for bug-gnulib@gnu.org; Tue, 07 Sep 2021 09:18:48 -0400 Received: by mail-io1-xd34.google.com with SMTP id a13so12705888iol.5 for ; Tue, 07 Sep 2021 06:18:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=V6a3Zh+920cizwfQLDIvGk0zUx+Lor6UCYpfsK2912U=; b=DOzT+dBHUCzfDSxps6ZyZCfN8eJgIzmFyRGoPrOPhcZC1FDoUGvyesq+h7bg9gB4lS DfahIdMWxGstSo+OR7MxD13TZvlykkVL9FEUVeypKvrgzMkfxgnRjZoS1dOyVb3yoRKX 0qRwuOocEkMylDmucyb3y4PHyCsa7RjX5mtT2FtAInQgd0rF4TxLqDPkBaa9URD3hGzl xrE/YBqI69YZWK9LO9O7i+11XG3LGhWup+u0AYBc7f5FylGigzDbWL9gb7QevsGutujI UmPZmWQLfSeVL222Kx5D8uSoQNvLfi9NleAajGt03t/1T2pUW8Asyuq4P0sLr/xXHIW8 Nkaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=V6a3Zh+920cizwfQLDIvGk0zUx+Lor6UCYpfsK2912U=; b=jF3otKxznOo5bjkO9Qp2Tt5r42Zd7oylBCdJbUCNl3Dw4MQ+9HhyBesFwZAEP6JiTx NoDFJN80ol4f7fxHkTHt0hTy7N3v34zwHkQhs7ub3Vtsqkub9rJ0w2SMnDbxqq6tYBzE 3XMuMBuHahpkq7VqEeAwZfmzJm/5miihN8HlzdDtvOVYOiFaOAbdjQck81TlIKCdaGK7 v/6DMeTD/6mecNn+UdQAp0Wyzn3Ek+2Iog3Tyk+yhKKewgsQZegHk7igm46uuIfcLEF+ Qf1C56m/wc3a/tDnEyl9Bj1vqEL6i1b+2fW6P2xiYBGdxfttx6WJ6r9MK3UazIKrQFSq fuBw== X-Gm-Message-State: AOAM5326IsanJcG01czPUKnsqlD8nVQSdmrKLQbyb/tsNsC9F8CXLesb HPy+ZFfecaz3hJXpI98j3N3nAm6A+pKGvw6VJ+1z1woegLk= X-Google-Smtp-Source: ABdhPJyEAVunjrDq9BRaLz+CsbWIJkUt/1SAmeIh/MdsGzDKyHrDYWxtGhyjkMCOQ0efUvR/blGcgM07CdCxPzgd7b4= X-Received: by 2002:a05:6638:238c:: with SMTP id q12mr15578014jat.70.1631020725568; Tue, 07 Sep 2021 06:18:45 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Lucy Phipps Date: Tue, 7 Sep 2021 14:18:34 +0100 Message-ID: Subject: Re: #include on Android clang causes an error To: bug-gnulib@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::d34; envelope-from=landfillbaby69@gmail.com; helo=mail-io1-xd34.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 07 Sep 2021 10:39:09 -0400 X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" 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 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 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 > > > > /* Get free(). */ > > -#include > > +void free(void *); > > > > /* MirBSD defines mbslen as a macro. */ > > #if @GNULIB_MBSLEN@ && defined __MirBSD__