Blame SOURCES/open-iscsi-2.0.876-5-bnx2x.c-Reorder-the-includes-to-avoid-duplicate-defines-with-musl.patch

e88930
From 96a2c0c1629f05d452af32c809f30bc4d0c3220e Mon Sep 17 00:00:00 2001
e88930
From: Khem Raj <raj.khem@gmail.com>
e88930
Date: Fri, 2 Feb 2018 23:28:33 -0800
e88930
Subject: [PATCH] bnx2x.c: Reorder the includes to avoid duplicate defines with
e88930
 musl
e88930
e88930
including nic.h before linux/ethtool.h avoids redefinitions of
e88930
eth structs
e88930
e88930
/mnt/a/oe/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-musleabi/iscsi-initiator-utils/2.0.876-r0/recipe-sysroot/
e88930
usr/include/netinet/if_ether.h:104:8: error: redefinition of 'struct ethhdr'
e88930
 struct ethhdr {
e88930
        ^~~~~~
e88930
In file included from /mnt/a/oe/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-musleabi/iscsi-initiator-utils/2.0.
e88930
876-r0/recipe-sysroot/usr/include/linux/ethtool.h:19:0,
e88930
                 from qedi.c:52:
e88930
/mnt/a/oe/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-musleabi/iscsi-initiator-utils/2.0.876-r0/recipe-sysroot/
e88930
usr/include/linux/if_ether.h:154:8: note: originally defined here
e88930
 struct ethhdr {
e88930
        ^~~~~~
e88930
e88930
Signed-off-by: Khem Raj <raj.khem@gmail.com>
e88930
---
e88930
 iscsiuio/src/unix/libs/bnx2x.c | 6 +++++-
e88930
 1 file changed, 5 insertions(+), 1 deletion(-)
e88930
e88930
diff --git a/iscsiuio/src/unix/libs/bnx2x.c b/iscsiuio/src/unix/libs/bnx2x.c
e88930
index 3df6d5fdbfa2..c5e7b7191811 100644
e88930
--- a/iscsiuio/src/unix/libs/bnx2x.c
e88930
+++ b/iscsiuio/src/unix/libs/bnx2x.c
e88930
@@ -36,6 +36,11 @@
e88930
  * bnx2x.c - bnx2x user space driver
e88930
  *
e88930
  */
e88930
+
e88930
+/* include nic.h before linux/ethtool.h to avoid redefinitions of
e88930
+ * eth structs
e88930
+*/
e88930
+#include "nic.h"
e88930
 #include <errno.h>
e88930
 #include <stdio.h>
e88930
 #include <string.h>
e88930
@@ -58,7 +63,6 @@
e88930
 #include "bnx2x.h"
e88930
 #include "cnic.h"
e88930
 #include "logger.h"
e88930
-#include "nic.h"
e88930
 #include "nic_id.h"
e88930
 #include "nic_utils.h"
e88930
 #include "options.h"
e88930
-- 
e88930
2.17.2
e88930