From patchwork Sun Aug 27 10:45:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Gray X-Patchwork-Id: 806208 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3xgBPs3YfLz9sMN for ; Sun, 27 Aug 2017 20:45:36 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 8F6E4C21DBC; Sun, 27 Aug 2017 10:45:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 3EA1CC21D58; Sun, 27 Aug 2017 10:45:24 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 61369C21D58; Sun, 27 Aug 2017 10:45:22 +0000 (UTC) Received: from lechuck.jsg.id.au (jsg.id.au [210.15.216.215]) by lists.denx.de (Postfix) with ESMTPS id EFE01C21C35 for ; Sun, 27 Aug 2017 10:45:20 +0000 (UTC) Received: from largo.jsg.id.au (largo.jsg.id.au [192.168.1.43]) by lechuck.jsg.id.au (OpenSMTPD) with ESMTP id 22166445; Sun, 27 Aug 2017 20:45:14 +1000 (AEST) Received: from largo.jsg.id.au (localhost [127.0.0.1]) by largo.jsg.id.au (OpenSMTPD) with ESMTP id 3798ecb8; Sun, 27 Aug 2017 20:45:14 +1000 (AEST) From: Jonathan Gray To: u-boot@lists.denx.de Date: Sun, 27 Aug 2017 20:45:14 +1000 Message-Id: <20170827104514.77150-1-jsg@jsg.id.au> X-Mailer: git-send-email 2.12.2 Subject: [U-Boot] [PATCH] bch: don't use __BSD_VISIBLE to test for fls X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Commit 4ecc988301bc8e981e6d7538c57cdb3aa82f7c1d assumes fls is in libc if __BSD_VISIBLE is defined. This appears to only be true on FreeBSD and DragonFlyBSD. OpenBSD defines __BSD_VISIBLE and does not have fls in strings.h/libc. Switch the test for __BSD_VISIBLE to one for __DragonFly__ and __FreeBSD__ to unbreak the build on OpenBSD. Signed-off-by: Jonathan Gray --- lib/bch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bch.c b/lib/bch.c index 7a2d9d3b86..d0d7e25c4e 100644 --- a/lib/bch.c +++ b/lib/bch.c @@ -117,7 +117,7 @@ struct gf_poly_deg1 { }; #ifdef USE_HOSTCC -#ifndef __BSD_VISIBLE +#if !defined(__DragonFly__) && !defined(__FreeBSD__) static int fls(int x) { int r = 32;