[dpdk-dev] [PATCH] net/bnx2x: fix meson build failure
Rasesh Mody
rmody at marvell.com
Fri Nov 1 07:02:28 CET 2019
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 at marvell.com>
Tested-by: Dharmik Thakkar <dharmik.thakkar at arm.com>
Tested-by: Gavin Hu <gavin.hu at 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
More information about the dev
mailing list