DPDK patches and discussions
 help / color / mirror / Atom feed
From: Rasesh Mody <rmody@marvell.com>
To: <dev@dpdk.org>, <bruce.richardson@intel.com>,
	<ferruh.yigit@intel.com>, <jerinj@marvell.com>
Cc: Rasesh Mody <rmody@marvell.com>, <GR-Everest-DPDK-Dev@marvell.com>
Subject: [dpdk-dev] [PATCH] net/bnx2x: fix meson build failure
Date: Thu, 31 Oct 2019 23:02:28 -0700	[thread overview]
Message-ID: <20191101060228.23271-1-rmody@marvell.com> (raw)

Use kernel headers for __le* types to avoid potential conflicts
resulting in redefinition errors during Linux builds. Add check
for BSD builds.

Fixes: 38dff79ba736 ("net/bnx2x: update HSI")

Signed-off-by: Rasesh Mody <rmody@marvell.com>
Tested-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Tested-by: Gavin Hu <gavin.hu@arm.com>
---
 drivers/net/bnx2x/bnx2x_osal.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/bnx2x/bnx2x_osal.h b/drivers/net/bnx2x/bnx2x_osal.h
index 7cd293259..72e4b6d6b 100644
--- a/drivers/net/bnx2x/bnx2x_osal.h
+++ b/drivers/net/bnx2x/bnx2x_osal.h
@@ -8,7 +8,11 @@
 #ifndef BNX2X_OSAL_H
 #define BNX2X_OSAL_H
 
+#ifdef __FreeBSD__
 #include <sys/stat.h>
+#else
+#include <linux/types.h>
+#endif
 
 #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
 #ifndef __LITTLE_ENDIAN
@@ -22,8 +26,10 @@
 #undef __LITTLE_ENDIAN
 #endif
 
+#ifdef __FreeBSD__
 #define __le16		uint16_t
 #define __le32		uint32_t
 #define __le64		uint64_t
+#endif
 
 #endif /* BNX2X_OSAL_H */
-- 
2.18.0


             reply	other threads:[~2019-11-01  6:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-01  6:02 Rasesh Mody [this message]
2019-11-05 18:14 ` Thomas Monjalon
2019-11-06  5:45 ` [dpdk-dev] [PATCH v2] " Rasesh Mody
2019-11-06 11:02   ` Thomas Monjalon
2019-11-05 20:34 [dpdk-dev] [PATCH] " Rasesh Mody

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=20191101060228.23271-1-rmody@marvell.com \
    --to=rmody@marvell.com \
    --cc=GR-Everest-DPDK-Dev@marvell.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jerinj@marvell.com \
    /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).