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 B41891F8C6 for ; Tue, 7 Sep 2021 14:39:16 +0000 (UTC) Received: from localhost ([::1]:35014 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNcFm-0006GJ-RT for normalperson@yhbt.net; Tue, 07 Sep 2021 10:39:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35778) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNatR-0002qT-Nk for bug-gnulib@gnu.org; Tue, 07 Sep 2021 09:12:05 -0400 Received: from mail-io1-xd2a.google.com ([2607:f8b0:4864:20::d2a]:35461) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mNatQ-0001Bi-86 for bug-gnulib@gnu.org; Tue, 07 Sep 2021 09:12:05 -0400 Received: by mail-io1-xd2a.google.com with SMTP id a15so12680258iot.2 for ; Tue, 07 Sep 2021 06:12:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=Il7xof4Yw4p283wrRZFOxzjZ0vqUsD3T7FTBW5BSFWE=; b=dCpqjhodKlelO2Siq7gge84OW2Fl6zbrOQLQfSrz57b9chEBTAUnSkbdpEEThQjFUF jT9DbRXeSFbphSCwS6GwQ4WmXuSJOUADOdFTokwwxO5ngu0bdYMjbqzTTh4ulTS81IBA 4zKtqmmgJWBT+JGOb8aAMfdItSyJ0b0lf+PFjjjP41yuDuuTXuZSPlpusSox5XGlbLwR TwOJzyS7UkEs+e5kRcVA2fbCq6kqsesBAviO2/bqkTbJc0MPo5ufnqYcS7enW2H2VYC1 dxCPKDalWgQF0wGvJYxzyqkW5DE3In5eI3bI5Ovd30Tn+K1s3R+61tkv8ZqfZ1fU2EWo teow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Il7xof4Yw4p283wrRZFOxzjZ0vqUsD3T7FTBW5BSFWE=; b=Qqq5WkpsRC9e9t+KI7J8Z2lwKJ2x4a18DWszRp7kh03mdMpoNMSiBWWPOUvs6umuJV yp4HJyyEoHZD1gD3Wf/U2YCp0KFbZqk4M3iOqqLN1AlVBhXde7T/Znossx3IYM7OjQbj Jby15MTebTQifLOinXRiXFTzuFPNBy2qEfr+7juzTayTbRx9UMaONWzYgNTcXVwzemRY iipt5ipF98BW8/vZYR2VjikvE/V9thYOXwwwU5kEMF5PxmOJhc7TNEl9M2wmhFRFqxG7 iBVeYG8EY3lU9shPY/SYIxZt53RQ02uFxhCvmd0wZspHtMZHwj7jdRJfyCW2/1EN615B vrPQ== X-Gm-Message-State: AOAM530AK8anfBNnOlWmKtaJmPmSs3lfB64XM5Aweva0W8Kd1Be9C7vC 6S/bkcGX8Q931Rw9SaNudfYWLA6KDJCsBOgmaYkZZHjKBuw= X-Google-Smtp-Source: ABdhPJx/yEyXREVqQXAKohmvfUMvFGlOVIttAAXuiSMHjD9TnRqEzNX3rmH+Jr4gZXtc8/W3DfKVL1/Q5gsY8ErSAFU= X-Received: by 2002:a02:9608:: with SMTP id c8mr15717067jai.133.1631020321152; Tue, 07 Sep 2021 06:12:01 -0700 (PDT) MIME-Version: 1.0 From: Lucy Phipps Date: Tue, 7 Sep 2021 14:11:50 +0100 Message-ID: Subject: #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::d2a; envelope-from=landfillbaby69@gmail.com; helo=mail-io1-xd2a.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" 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__