From patchwork Wed Apr 16 04:52:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baruch Siach X-Patchwork-Id: 339429 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 9285D14007F for ; Wed, 16 Apr 2014 14:55:13 +1000 (EST) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WaHqs-0005Qf-PN; Wed, 16 Apr 2014 04:53:38 +0000 Received: from guitar.tcltek.co.il ([192.115.133.116] helo=mx.tkos.co.il) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WaHqq-0004wF-R8 for linux-mtd@lists.infradead.org; Wed, 16 Apr 2014 04:53:37 +0000 Received: from sapphire.tkos.co.il (unknown [10.0.4.3]) by mx.tkos.co.il (Postfix) with ESMTPA id 6ED10440441; Wed, 16 Apr 2014 07:53:13 +0300 (IDT) From: Baruch Siach To: linux-mtd@lists.infradead.org Subject: [PATCH v2] include/common.h: fix build against recent 0.9.33 uClibc Date: Wed, 16 Apr 2014 07:52:48 +0300 Message-Id: <2c54c99957bae293249f9ab2a6077570d8671260.1397623968.git.baruch@tkos.co.il> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140415_215337_103998_C5437113 X-CRM114-Status: UNSURE ( 6.34 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.3.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- Cc: Baruch Siach , Mike Frysinger X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org An implementation of rpmatch() was backported to the 0.9.33 branch of uClibc. So the uClibc version check introduced in commit 50c9e11f7e (include/common.h: fix build against current uClibc) is not enough. Rename the local rpmatch() implementation to avoid collision. Cc: Mike Frysinger Signed-off-by: Baruch Siach Acked-by: Mike Frysinger --- v2: #undef rpmatch before redefining it (Mike Frysinger) --- include/common.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/common.h b/include/common.h index 3b1366e..6895e5c 100644 --- a/include/common.h +++ b/include/common.h @@ -107,7 +107,9 @@ extern "C" { #if __UCLIBC_MAJOR__ == 0 && \ (__UCLIBC_MINOR__ < 9 || \ (__UCLIBC_MINOR__ == 9 && __UCLIBC_SUBLEVEL__ < 34)) -static inline int rpmatch(const char *resp) +#undef rpmatch +#define rpmatch __rpmatch +static inline int __rpmatch(const char *resp) { return (resp[0] == 'y' || resp[0] == 'Y') ? 1 : (resp[0] == 'n' || resp[0] == 'N') ? 0 : -1;