Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 709CCCED26F for ; Tue, 8 Oct 2024 06:30:12 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4XN5jZ6B6vz2yXm for ; Tue, 8 Oct 2024 17:30:10 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=115.124.30.100 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1728369009; cv=none; b=YxLjNCybHNt38ruKPb7xPDnoukp1dEVfKPpjEacfcI7AXbiDizdCwPJNru2k/IPrSImDJEa2g9MMd83oID27LTEzsMU/E5LGwyuuEf0roksyzd8XALUIvR7FhGAZkby+30a0xJhLwAPTM/EQt5PrXVle/raZVU+uL/xAm3e3G+AyryrD/6joahQG9xguAMV9ObWCGM3BD8+41NuGyuJjN+n/BO3gdAs05VmhUVrq/Yf4XGdcDVyJiMiGK+jjrsBquRW7WwuoCJ4rAGlFhAbswohc6gn1YeQFcNherPyzu6RgReuVxhxK43xie1K0vLukLdIBMHem99Rk4qotdTs6vQ== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1728369009; c=relaxed/relaxed; bh=vFAYrJRGDjWGRjJcmQqEIOSMAlcDU2c32HSRkzW1Ogg=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=VyrR+5EQ6lo+bBbTSpPudEWPtuw8zJvlsHV+i3fwlVFlpQcs09cT/RjSUJ4Y0MgtuZk/OkTPttgUxgNWTjJZ8jdYZSfgSIsm+Z+ribtZvy1YHvlRXhMTsMHuYHpVQocIXsAgFrMrWb6q9iKjzB7Bh697RFuPzZzU2Bta58Gd65XwoePFWWht6K0ZOMdlv34Din8NQr+dPV/GVnXh3RACxPUfwAATOb/2p49sIeGDZ84XceD51S7j6jsMgjO4Br1djfhnOdsPt82LOJHIkybOTnBWvTksb9KWEjO/JEEQ1Sy9PqNG/F09xmhUX98JN3wQ0Lj6cu5XQktV9Nf7t6v49w== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; dkim=pass (1024-bit key; unprotected) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.a=rsa-sha256 header.s=default header.b=aqbpay/N; dkim-atps=neutral; spf=pass (client-ip=115.124.30.100; helo=out30-100.freemail.mail.aliyun.com; envelope-from=hsiangkao@linux.alibaba.com; receiver=lists.ozlabs.org) smtp.mailfrom=linux.alibaba.com Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.a=rsa-sha256 header.s=default header.b=aqbpay/N; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux.alibaba.com (client-ip=115.124.30.100; helo=out30-100.freemail.mail.aliyun.com; envelope-from=hsiangkao@linux.alibaba.com; receiver=lists.ozlabs.org) Received: from out30-100.freemail.mail.aliyun.com (out30-100.freemail.mail.aliyun.com [115.124.30.100]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4XN5jT478Cz2xHr for ; Tue, 8 Oct 2024 17:30:02 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1728368997; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; bh=vFAYrJRGDjWGRjJcmQqEIOSMAlcDU2c32HSRkzW1Ogg=; b=aqbpay/N/0q4uInWCv+pP7yFJH1p12ZAm08YLgRTlBh3A+xbjJDU2tkIst4pTtInkrnTJL2OszQBdT6G4hZmMGI4qv5Pso8tm/kc3MATl4vNks8S/Yjuzry+Hv9FTwyogIlBF9lnUmBCDxkWqM9iYNHufEIr1kj+w6Eq75+OEus= Received: from 30.221.129.198(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0WGaY5fC_1728368995) by smtp.aliyun-inc.com; Tue, 08 Oct 2024 14:29:56 +0800 Message-ID: Date: Tue, 8 Oct 2024 14:29:55 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] erofs-utils: lib: Explicitly include where used To: Satoshi Niwa , linux-erofs@lists.ozlabs.org References: <20241008060819.2442945-1-niwa@google.com> From: Gao Xiang In-Reply-To: <20241008060819.2442945-1-niwa@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: linux-erofs@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development of Linux EROFS file system List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-erofs-bounces+linux-erofs=archiver.kernel.org@lists.ozlabs.org Sender: "Linux-erofs" Hi Satoshi, On 2024/10/8 14:08, Satoshi Niwa via Linux-erofs wrote: > compress.c and inode.c use pthread functions but do not explicitly include . > This causes build failures with the Android build system, > which throws "error: implicit declaration of function pthread_*". > > Signed-off-by: Satoshi Niwa Thanks for catching this! Reviewed-by: Gao Xiang Thanks, Gao Xiang > --- > lib/compress.c | 3 +++ > lib/inode.c | 3 +++ > 2 files changed, 6 insertions(+) > > diff --git a/lib/compress.c b/lib/compress.c > index 17e7112..5d6fb2a 100644 > --- a/lib/compress.c > +++ b/lib/compress.c > @@ -8,6 +8,9 @@ > #ifndef _LARGEFILE64_SOURCE > #define _LARGEFILE64_SOURCE > #endif > +#ifdef EROFS_MT_ENABLED > +#include > +#endif > #include > #include > #include > diff --git a/lib/inode.c b/lib/inode.c > index 7958d43..48f46b1 100644 > --- a/lib/inode.c > +++ b/lib/inode.c > @@ -6,6 +6,9 @@ > * with heavy changes by Gao Xiang > */ > #define _GNU_SOURCE > +#ifdef EROFS_MT_ENABLED > +#include > +#endif > #include > #include > #include