From: Natanael Copa <ncopa@alpinelinux.org>
To: dev@dpdk.org, Hemant Agrawal <hemant.agrawal@nxp.com>,
Sachin Saxena <sachin.saxena@oss.nxp.com>
Cc: Natanael Copa <ncopa@alpinelinux.org>, stable@dpdk.org
Subject: [dpdk-stable] [PATCH v4 6/8] common/dpaax: build fix for musl libc
Date: Thu, 5 Nov 2020 22:17:14 +0100 [thread overview]
Message-ID: <20201105211716.25181-7-ncopa@alpinelinux.org> (raw)
In-Reply-To: <20201105211716.25181-1-ncopa@alpinelinux.org>
The swab16/swab32/swab64 are Linux specific and not 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.
Fixes: 04711d41a872 ("crypto/dpaa2_sec: add run-time assembler for descriptor")
Cc: stable@dpdk.org
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
drivers/common/dpaax/caamflib/compat.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/common/dpaax/caamflib/compat.h b/drivers/common/dpaax/caamflib/compat.h
index 36ee4b533..e755c77af 100644
--- a/drivers/common/dpaax/caamflib/compat.h
+++ b/drivers/common/dpaax/caamflib/compat.h
@@ -11,7 +11,7 @@
#include <stdint.h>
#include <errno.h>
-#ifdef __GLIBC__
+#ifdef __linux__
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
@@ -40,7 +40,7 @@
#define __maybe_unused __rte_unused
#endif
-#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 */
-#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 */
-#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
/* 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)
--
2.29.2
next prev parent reply other threads:[~2020-11-05 21:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <18966392.1bK43UoomU@xps>
[not found] ` <20201105211716.25181-1-ncopa@alpinelinux.org>
2020-11-05 21:17 ` [dpdk-stable] [PATCH v4 1/8] app/testpmd: fix uint build error with " Natanael Copa
2020-11-06 9:22 ` [dpdk-stable] [dpdk-dev] [PATCH v4 1/8] app/testpmd: fix uint build error withmusl libc Morten Brørup
2020-11-05 21:17 ` [dpdk-stable] [PATCH v4 2/8] net/cxgbe: fix uint build error with musl libc Natanael Copa
2020-11-06 9:24 ` [dpdk-stable] [dpdk-dev] [PATCH v4 2/8] net/cxgbe: fix uint build error with musllibc Morten Brørup
2020-11-05 21:17 ` [dpdk-stable] [PATCH v4 3/8] bus/pci: add fallback for out* for non GNU libc Natanael Copa
2020-11-05 21:17 ` [dpdk-stable] [PATCH v4 4/8] bus/dpaa: use warn instead of error to improve portability Natanael Copa
2020-11-05 21:17 ` [dpdk-stable] [PATCH v4 5/8] bus/dpaa: fix detection of 64 bit arch Natanael Copa
2020-11-05 21:17 ` Natanael Copa [this message]
2020-11-05 21:17 ` [dpdk-stable] [PATCH v4 8/8] eal: add missing include to fix build with musl libc Natanael Copa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201105211716.25181-7-ncopa@alpinelinux.org \
--to=ncopa@alpinelinux.org \
--cc=dev@dpdk.org \
--cc=hemant.agrawal@nxp.com \
--cc=sachin.saxena@oss.nxp.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).