From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26FDEC18E5B for ; Wed, 25 Mar 2020 08:30:16 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CBA6420409 for ; Wed, 25 Mar 2020 08:30:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.ozlabs.org header.i=@lists.ozlabs.org header.b="PRkdDotk"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=aol.com header.i=@aol.com header.b="nC2dT3R6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CBA6420409 Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=lists.ozlabs.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-erofs-bounces+linux-erofs=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 48nLsK5kKRzDqZR for ; Wed, 25 Mar 2020 19:30:13 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.ozlabs.org; s=201707; t=1585125013; bh=kys10NOD3v9XfQm+Nw8qWQZY+82FLIiXRu1f/5mO5nc=; h=To:Subject:Date:References:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=PRkdDotkvaTOdClGeePS7PC1uVaZv7BMa23IdvHPp1h39H4SON9a8qTjb9uEWIZlT vDnFcuwz0UiN1GXIjqiNUb3Zjjg6Oe1PU64V6PH3rRd30+OMIZm0dArReb7u/w5MiM Tf8lLMqfoQ1P8YTfjkoqiVSIMcFqvnUY6l6sRmdX2pNr346L/1pYlnjbgYePdIXioc MMohpY7xKrczMMIIe5pgmltWcYQvUdcXZVPfi+IpBix9MS18Gpj0VeRj5e/AqqnzR7 MWa8S7uaJAXMrJQvknFxFvjpMHelZ8dR1r3g4y8o/TdLUOOc9EmpgMt1kfiXsNO16e FgWefALYb4ddg== Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=aol.com (client-ip=66.163.186.204; helo=sonic310-23.consmr.mail.ne1.yahoo.com; envelope-from=hsiangkao@aol.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=reject dis=none) header.from=aol.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=aol.com header.i=@aol.com header.a=rsa-sha256 header.s=a2048 header.b=nC2dT3R6; dkim-atps=neutral Received: from sonic310-23.consmr.mail.ne1.yahoo.com (sonic310-23.consmr.mail.ne1.yahoo.com [66.163.186.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 48nLs74b7YzDqMb for ; Wed, 25 Mar 2020 19:30:00 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1585124996; bh=VscBPrzEAmQQmG2FXLAo/UMaScyOyCp6mtduvOD/3xQ=; h=From:To:Cc:Subject:Date:References:From:Subject; b=nC2dT3R65aocW7CoXqJ4xd98NtR/bPA1rhsqqLj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1.MmJETnktTeTXju5LeP2YnHQDcqrNPwk1uFjsy.hj8BRRL6j654FpijXzgvoTvCkNpfkxUVJzJ1 fX0WuH_Ch_KLivHtZmQMZ2qdFCMZkfYgL2EzHHp3bkLRGclf4bvuRZ6Fu6BBfXZE9xv0slpGZI14 pTu8U7EbuGTxFPZ_FjZA6.2G9htlrecNrzxuFiVuNOpT7JKBK3QpvUTM7moYjLeUf8lVV66Y00vD R54FIr_vT7RVNnJUf2P7QUgZsWwZ7FecipTWnKV5ZaIXblgi9P4tUdg1_tf1H53Y3nZhB9fJwa6d E.DITqJkzQzJIrOr19jQvzmUBpeW304psvYyH34RepFpbOgY9lFZrHuyjDlgGJHlczR5g4HUpgfu BwiGtBqu22IsnB3dkNV7svaTlySGnSmNDiMT1CvN4RWmIxdlO4fk0xLjRYVASjkUeK6Fant_XY59 bUglwhF029qxwE2mMgCwFZu3qL6aG0LuW7byyiB4zNEjeY._w2XsYoY2oZbsOtg8DXaMIC6wGQlF VmA3SgzTvlt7cfK1NwkbFr9HIquWfWr0sE1sheOuL.gzOfhGH.Xt39sR79ZZOtwqSRJBJkqbT5mt CDVhwiNmKWW9QlHttjYfanxPDtsuTVMTBTqEOR_HdSF1IKwtvQRkQva3X1hNI5fv.kGwg4LegQL3 HmdoMGMqble2Lsvrcbx.oFfMS.s8qq2tT Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.ne1.yahoo.com with HTTP; Wed, 25 Mar 2020 08:29:56 +0000 Received: by smtp401.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 6a2e30364f31f59960160cd79beebb87; Wed, 25 Mar 2020 08:29:54 +0000 (UTC) To: linux-erofs@lists.ozlabs.org, Li Guifu , Li GuiFu Subject: [PATCH] erofs-utils: avoid PAGE_SIZE redefinition Date: Wed, 25 Mar 2020 16:29:30 +0800 Message-Id: <20200325082930.2025-1-hsiangkao@aol.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit References: <20200325082930.2025-1-hsiangkao.ref@aol.com> 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: , From: Gao Xiang via Linux-erofs Reply-To: Gao Xiang Errors-To: linux-erofs-bounces+linux-erofs=archiver.kernel.org@lists.ozlabs.org Sender: "Linux-erofs" Buildroot autobuild reported a PAGE_SIZE redefinition with some configrations on i586 toolchain [1] (I didn't notice such report from erofs-utils travis CI or distribution builds before.) In file included from config.c:11: ../include/erofs/internal.h:27: error: "PAGE_SIZE" redefined [-Werror] #define PAGE_SIZE (1U << PAGE_SHIFT) In file included from ../include/erofs/defs.h:17, from ../include/erofs/config.h:12, from ../include/erofs/print.h:12, from config.c:10: .../sysroot/usr/include/limits.h:89: note: this is the location of the previous definition #define PAGE_SIZE PAGESIZE cc1: all warnings being treated as errors Fix it now. [1] http://autobuild.buildroot.net/results/340b98caa45bafd43f109002be9da59ba7f6d971 Signed-off-by: Gao Xiang --- include/erofs/internal.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/erofs/internal.h b/include/erofs/internal.h index e7d5a64..41da189 100644 --- a/include/erofs/internal.h +++ b/include/erofs/internal.h @@ -23,8 +23,18 @@ typedef unsigned short umode_t; #define PATH_MAX 4096 /* # chars in a path name including nul */ #endif +#ifndef PAGE_SHIFT #define PAGE_SHIFT (12) +#endif + +#ifndef PAGE_SIZE #define PAGE_SIZE (1U << PAGE_SHIFT) +#endif + +/* no obvious reason to support explicit PAGE_SIZE != 4096 for now */ +#if PAGE_SIZE != 4096 +#error incompatible PAGE_SIZE is already defined +#endif #define LOG_BLOCK_SIZE (12) #define EROFS_BLKSIZ (1U << LOG_BLOCK_SIZE) -- 2.20.1