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 093711F8C6 for ; Tue, 7 Sep 2021 14:39:17 +0000 (UTC) Received: from localhost ([::1]:35122 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNcFo-0006L2-1n for normalperson@yhbt.net; Tue, 07 Sep 2021 10:39:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39974) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNaxy-0004SV-K9 for bug-gnulib@gnu.org; Tue, 07 Sep 2021 09:16:46 -0400 Received: from mail-io1-xd34.google.com ([2607:f8b0:4864:20::d34]:44915) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mNaxx-0003G5-4Z for bug-gnulib@gnu.org; Tue, 07 Sep 2021 09:16:46 -0400 Received: by mail-io1-xd34.google.com with SMTP id g9so12717413ioq.11 for ; Tue, 07 Sep 2021 06:16:44 -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=eaNwY+DgSvqGjmB8sB6PGV658JzAXlSzstfIXtO/ex4=; b=B/0gtonVCBB+K3vsPfjAan056SNu6ctOSwo4VYbIYLMfAUyE1Dq9USrXhAK+jeGpM5 1kvrxitnaENnN3gjiTdZbimkxshqY/2HgIOd07Rmbf9tHbWz+i+yL9CIvfME9EIkl9Le M3CDGJ8thJuen74hPEGJPtuAgjgMqud0g1JTuQxA7T2Rq9E+LcXq+uhjdvFG9A2jEYPB sstUeIPZjj+k02SD2TbFuGrOAJSsluwGWQlEWq0OZ94cl9GNCpBK93uhO+BRh17yjI1f kIg2HRaCIU8h8vZ7CwA3o+KAN5qZaq4+zRQ0NM9DfCedaw5Pm8u0yLzA8CtLBpq1clfr j3+Q== 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=eaNwY+DgSvqGjmB8sB6PGV658JzAXlSzstfIXtO/ex4=; b=PZYDN6VS2WeDaNKHp0TD2Btnd9RfUaoWOywRKAKbjXwlTXcKEf1to0cokE/OJSJSa1 ybMMRXwUc6n421jlEhfrtvd3HI8rQv4k9Y6T5tCMUQILEnKekgUBQ+YWpNwB1P3pdA7x D1/R6BHBHmdXEmbyxWoN+Cr2/dWgpHBfqqa75bGqHxsI01w0fqD5xJRToWnZLrKX6h0h jCaI9fTyKTPlABVBwysRUJ/w6JTWa8KoNorFMfYVv0xTp0OMUteRfRgnUtdYTJSNUA0n wHuy2pk5TZkd38ByGbW70b2P6pOHlhrjhrJbMPm7EjvOcpqqsZkt512jEg381EmyTv/h tqYQ== X-Gm-Message-State: AOAM532tIKavnuMpBNmkf7vWH62nC13iZcntCeK5dD+NW8CeHXs3gMyA nq5NEjtfzcY9GJKeCggEchV5VcPcnzoeWmlxraMWeZ6vdnM= X-Google-Smtp-Source: ABdhPJwwSG7UpSf72mIBrZQ+uzpe6ViezzLByLDW4wrF6D/XdtL0zFNHLZxQ2ZmXzml6vx86oZNsq8yqbWj68q4UmkM= X-Received: by 2002:a5d:8b17:: with SMTP id k23mr14050026ion.17.1631020603989; Tue, 07 Sep 2021 06:16:43 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Lucy Phipps Date: Tue, 7 Sep 2021 14:16:33 +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" 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__