From patchwork Fri Jun 19 19:15:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Chemparathy X-Patchwork-Id: 5643 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id E2AF9C954; Fri, 19 Jun 2015 21:15:23 +0200 (CEST) Received: from sclab-apps-2.localdomain (sc-fw1.tilera.com [12.218.212.162]) by dpdk.org (Postfix) with ESMTP id EF117C92E for ; Fri, 19 Jun 2015 21:15:10 +0200 (CEST) X-CheckPoint: {55846A3E-4-A3D4DA0C-C0000002} Received: by sclab-apps-2.localdomain (Postfix, from userid 1318) id 543D82202E6; Fri, 19 Jun 2015 12:15:10 -0700 (PDT) From: Cyril Chemparathy To: dev@dpdk.org Date: Fri, 19 Jun 2015 12:15:00 -0700 Message-Id: <1434741309-22415-3-git-send-email-cchemparathy@ezchip.com> X-Mailer: git-send-email 2.1.2 In-Reply-To: <1434741309-22415-1-git-send-email-cchemparathy@ezchip.com> References: <1434741309-22415-1-git-send-email-cchemparathy@ezchip.com> Subject: [dpdk-dev] [PATCH 02/11] hash: fix compilation on non-X86 platforms X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The "hash: remove duplicated code" change unfortunately broke the build for non-X86 platforms. This patch fixes this breakage. Change-Id: Ie109d67e681b75b45320fab1bf9de4eb9c9701bf Signed-off-by: Cyril Chemparathy --- lib/librte_hash/rte_jhash.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/librte_hash/rte_jhash.h b/lib/librte_hash/rte_jhash.h index e230449..d1b6cf3 100644 --- a/lib/librte_hash/rte_jhash.h +++ b/lib/librte_hash/rte_jhash.h @@ -44,6 +44,7 @@ extern "C" { #endif +#include #include #include @@ -122,7 +123,7 @@ __rte_jhash_2hashes(const void *key, uint32_t length, uint32_t *pc, const uint32_t *k = key; const uint32_t s = 0; #else - const uint32_t *k = (uint32_t *)(uintptr_t)key & (uintptr_t)~3); + const uint32_t *k = (uint32_t *)((uintptr_t)key & (uintptr_t)~3); const uint32_t s = ((uintptr_t)key & 3) * CHAR_BIT; #endif if (!check_align || s == 0) {