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 A5ABA4D27 for ; Mon, 11 Mar 2019 18:37:42 +0100 (CET) Received: from mx1.tetrasec.net (mail.local [127.0.0.1]) by mx1.tetrasec.net (Postfix) with ESMTP id 2A8F79E1F68; Mon, 11 Mar 2019 17:37:42 +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 470969E1F6A; Mon, 11 Mar 2019 17:37:41 +0000 (UTC) From: Natanael Copa To: dev@dpdk.org Cc: Natanael Copa Date: Mon, 11 Mar 2019 18:36:59 +0100 Message-Id: <20190311173702.24471-13-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 12/15] crypto/dpaa2_sec: build fix for musl libc 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:43 -0000 The swab16/swab32/swab64 are Linux specific and nog GNU libc specific. Keep the check for __GLIBC__ just in case other GNU systems depends on this (Hurd or GNU/kFreeBSD). This fixes a build error with musl libc. Signed-off-by: Natanael Copa --- I guess the check for __linux__ and __GLIBC__ could be completely removed= , but I was not sure. drivers/crypto/dpaa2_sec/hw/compat.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/crypto/dpaa2_sec/hw/compat.h b/drivers/crypto/dpaa2_= sec/hw/compat.h index ce946ccb5..b9564d848 100644 --- a/drivers/crypto/dpaa2_sec/hw/compat.h +++ b/drivers/crypto/dpaa2_sec/hw/compat.h @@ -11,7 +11,7 @@ #include #include =20 -#ifdef __GLIBC__ +#ifdef __linux__ #include #include #include @@ -40,7 +40,7 @@ #define __maybe_unused __attribute__((unused)) #endif =20 -#if defined(__GLIBC__) && !defined(pr_debug) +#if !defined(pr_debug) #if !defined(SUPPRESS_PRINTS) && defined(RTA_DEBUG) #define pr_debug(fmt, ...) \ RTE_LOG(DEBUG, PMD, "%s(): " fmt "\n", __func__, ##__VA_ARGS__) @@ -49,7 +49,7 @@ #endif #endif /* pr_debug */ =20 -#if defined(__GLIBC__) && !defined(pr_err) +#if !defined(pr_err) #if !defined(SUPPRESS_PRINTS) #define pr_err(fmt, ...) \ RTE_LOG(ERR, PMD, "%s(): " fmt "\n", __func__, ##__VA_ARGS__) @@ -58,7 +58,7 @@ #endif #endif /* pr_err */ =20 -#if defined(__GLIBC__) && !defined(pr_warn) +#if !defined(pr_warn) #if !defined(SUPPRESS_PRINTS) #define pr_warn(fmt, ...) \ RTE_LOG(WARNING, PMD, "%s(): " fmt "\n", __func__, ##__VA_ARGS__) @@ -101,7 +101,7 @@ #endif =20 /* Use Linux naming convention */ -#ifdef __GLIBC__ +#if defined(__linux__) || defined (__GLIBC__) #define swab16(x) rte_bswap16(x) #define swab32(x) rte_bswap32(x) #define swab64(x) rte_bswap64(x) --=20 2.21.0