From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.tetrasec.net (mx1.tetrasec.net [74.117.190.25]) by dpdk.org (Postfix) with ESMTP id 7B0DA4F9A for ; Mon, 11 Mar 2019 18:37:41 +0100 (CET) Received: from mx1.tetrasec.net (mail.local [127.0.0.1]) by mx1.tetrasec.net (Postfix) with ESMTP id 007369E1F68; Mon, 11 Mar 2019 17:37:41 +0000 (UTC) Received: from ncopa-desktop.lan (67.63.200.37.customer.cdi.no [37.200.63.67]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: n@tanael.org) by mx1.tetrasec.net (Postfix) with ESMTPSA id 418469E1F6A; Mon, 11 Mar 2019 17:37:40 +0000 (UTC) From: Natanael Copa To: dev@dpdk.org Cc: Natanael Copa Date: Mon, 11 Mar 2019 18:36:58 +0100 Message-Id: <20190311173702.24471-12-ncopa@alpinelinux.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190311173702.24471-1-ncopa@alpinelinux.org> References: <20190311173702.24471-1-ncopa@alpinelinux.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: [dpdk-dev] [PATCH 11/15] bus/dpaa: fix warning: "__WORDSIZE" is not defined, evaluates to 0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 17:37:41 -0000 There is no standard saying that __WORDSIZE should be be defined or in what include it should be defined. Use a portable way to detect 64 bit environment. This fixes a warning when building with musl libc: warning: "__WORDSIZE" is not defined, evaluates to 0 [-Wundef] Signed-off-by: Natanael Copa --- This was not really a compile error but the warning looked scary enough. There are various alternative ways to detect 64bit user-space at compile = time, but this is the most portable way I think. drivers/bus/dpaa/include/fsl_qman.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/bus/dpaa/include/fsl_qman.h b/drivers/bus/dpaa/inclu= de/fsl_qman.h index e43841499..7f3f40d49 100644 --- a/drivers/bus/dpaa/include/fsl_qman.h +++ b/drivers/bus/dpaa/include/fsl_qman.h @@ -11,11 +11,12 @@ extern "C" { #endif =20 +#include #include #include =20 /* FQ lookups (turn this on for 64bit user-space) */ -#if (__WORDSIZE =3D=3D 64) +#if (ULONG_MAX =3D=3D 0xffffffffffffffff) #define CONFIG_FSL_QMAN_FQ_LOOKUP /* if FQ lookups are supported, this controls the number of initialised, * s/w-consumed FQs that can be supported at any one time. --=20 2.21.0