aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0003-bnx2x.c-Reorder-the-includes-to-avoid-duplicate-defi.patch
blob: 0ce155f7a2d1b0feffc550dffdbd2d293e9ba9bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
From 9b7a32903b56ce4d41f264a345ca59a0b00d53b3 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 2 Feb 2018 23:28:33 -0800
Subject: [PATCH 3/4] bnx2x.c: Reorder the includes to avoid duplicate defines
 with musl

including nic.h before linux/ethtool.h avoids redefinitions of
eth structs

/mnt/a/oe/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-musleabi/iscsi-initiator-utils/2.0.876-r0/recipe-sysroot/
usr/include/netinet/if_ether.h:104:8: error: redefinition of 'struct ethhdr'
 struct ethhdr {
        ^~~~~~
In file included from /mnt/a/oe/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-musleabi/iscsi-initiator-utils/2.0.
876-r0/recipe-sysroot/usr/include/linux/ethtool.h:19:0,
                 from qedi.c:52:
/mnt/a/oe/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-musleabi/iscsi-initiator-utils/2.0.876-r0/recipe-sysroot/
usr/include/linux/if_ether.h:154:8: note: originally defined here
 struct ethhdr {
        ^~~~~~

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 iscsiuio/src/unix/libs/bnx2x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/iscsiuio/src/unix/libs/bnx2x.c b/iscsiuio/src/unix/libs/bnx2x.c
index 3df6d5f..62530d1 100644
--- a/iscsiuio/src/unix/libs/bnx2x.c
+++ b/iscsiuio/src/unix/libs/bnx2x.c
@@ -36,6 +36,7 @@
  * bnx2x.c - bnx2x user space driver
  *
  */
+#include "nic.h"
 #include <errno.h>
 #include <stdio.h>
 #include <string.h>
@@ -58,7 +59,6 @@
 #include "bnx2x.h"
 #include "cnic.h"
 #include "logger.h"
-#include "nic.h"
 #include "nic_id.h"
 #include "nic_utils.h"
 #include "options.h"
-- 
2.16.1