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

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