blob: 6d73d715ce37d38fdaaba11fd72ad3c9ad73dcaa [file] [log] [blame]
Brad Bishopa34c0302019-09-23 22:34:48 -04001Include netinet/if_ether.h
Brad Bishop19323692019-04-05 15:28:33 -04002
3Fixes
4/path/to/systemd/recipe-sysroot/usr/include/netinet/if_ether.h:101:8: error: redefinition of 'struct ethhdr'
5 struct ethhdr {
6 ^~~~~~
7
Brad Bishopa34c0302019-09-23 22:34:48 -04008and related arphdr, arpreq, and arpreq_old errors
9/path/to/systemd/recipe-sysroot/usr/include/net/if_arp.h:22:8: error: redefinition of 'struct arphdr'
10 struct arphdr {
11 ^~~~~~
12
13The latter requires removing some includes of net/if_arp.h to avoid
14conflicting with netinet/if_ether.h.
15
Brad Bishop19323692019-04-05 15:28:33 -040016Upstream-Status: Inappropriate [musl specific]
17
18Signed-off-by: Khem Raj <raj.khem@gmail.com>
19Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Brad Bishopa34c0302019-09-23 22:34:48 -040020[rebased for systemd 243]
21Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Brad Bishop19323692019-04-05 15:28:33 -040022
Brad Bishopa34c0302019-09-23 22:34:48 -040023Upstream-Status: Inappropriate [musl specific]
24
25Signed-off-by: Khem Raj <raj.khem@gmail.com>
26Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
27[rebased for systemd 243]
28Signed-off-by: Scott Murray <scott.murray@konsulko.com>
29---
30 src/libsystemd-network/sd-dhcp6-client.c | 1 -
31 src/libsystemd/sd-netlink/netlink-types.c | 1 +
32 src/machine/machine-dbus.c | 1 +
33 src/network/netdev/macsec.c | 1 +
34 src/network/netdev/netdev.c | 1 +
35 src/network/networkd-brvlan.c | 1 +
36 src/network/networkd-dhcp-common.c | 1 +
37 src/network/networkd-dhcp4.c | 2 +-
38 src/network/networkd-dhcp6.c | 2 +-
39 src/network/networkd-link.c | 2 +-
40 src/network/networkd-network.c | 1 +
41 src/shared/ethtool-util.c | 1 +
42 src/shared/ethtool-util.h | 1 +
43 src/udev/net/link-config.c | 1 +
44 src/udev/udev-builtin-net_setup_link.c | 1 +
45 15 files changed, 14 insertions(+), 4 deletions(-)
46
47diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c
48index d7a5349c70..68b41dfb6c 100644
49--- a/src/libsystemd-network/sd-dhcp6-client.c
50+++ b/src/libsystemd-network/sd-dhcp6-client.c
51@@ -6,7 +6,6 @@
52 #include <errno.h>
53 #include <string.h>
54 #include <sys/ioctl.h>
55-#include <linux/if_arp.h>
56 #include <linux/if_infiniband.h>
57
58 #include "sd-dhcp6-client.h"
Brad Bishop19323692019-04-05 15:28:33 -040059diff --git a/src/libsystemd/sd-netlink/netlink-types.c b/src/libsystemd/sd-netlink/netlink-types.c
Brad Bishopa34c0302019-09-23 22:34:48 -040060index de9b8b21ab..f64f6500f7 100644
Brad Bishop19323692019-04-05 15:28:33 -040061--- a/src/libsystemd/sd-netlink/netlink-types.c
62+++ b/src/libsystemd/sd-netlink/netlink-types.c
63@@ -3,6 +3,7 @@
64 #include <netinet/in.h>
65 #include <stdint.h>
66 #include <sys/socket.h>
67+#include <netinet/if_ether.h>
Brad Bishopa34c0302019-09-23 22:34:48 -040068 #include <linux/can/vxcan.h>
Brad Bishop19323692019-04-05 15:28:33 -040069 #include <linux/netlink.h>
70 #include <linux/rtnetlink.h>
Brad Bishopa34c0302019-09-23 22:34:48 -040071diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c
72index 0d58b5eb8b..01093c1f62 100644
73--- a/src/machine/machine-dbus.c
74+++ b/src/machine/machine-dbus.c
75@@ -4,6 +4,7 @@
76 #include <string.h>
77 #include <sys/mount.h>
78 #include <sys/wait.h>
Brad Bishop19323692019-04-05 15:28:33 -040079+#include <netinet/if_ether.h>
Brad Bishopa34c0302019-09-23 22:34:48 -040080
81 /* When we include libgen.h because we need dirname() we immediately
82 * undefine basename() since libgen.h defines it as a macro to the POSIX
83diff --git a/src/network/netdev/macsec.c b/src/network/netdev/macsec.c
84index cf281e75a6..269dc618ff 100644
85--- a/src/network/netdev/macsec.c
86+++ b/src/network/netdev/macsec.c
87@@ -1,5 +1,6 @@
88 /* SPDX-License-Identifier: LGPL-2.1+ */
89
90+#include <netinet/if_ether.h>
91 #include <netinet/in.h>
92 #include <linux/if_ether.h>
93 #include <linux/if_macsec.h>
94diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c
95index 7735b455b7..ed4eda4a44 100644
96--- a/src/network/netdev/netdev.c
97+++ b/src/network/netdev/netdev.c
98@@ -1,5 +1,6 @@
99 /* SPDX-License-Identifier: LGPL-2.1+ */
100
101+#include <netinet/if_ether.h>
Brad Bishop19323692019-04-05 15:28:33 -0400102 #include <net/if.h>
Brad Bishopa34c0302019-09-23 22:34:48 -0400103 #include <netinet/in.h>
104
Brad Bishop19323692019-04-05 15:28:33 -0400105diff --git a/src/network/networkd-brvlan.c b/src/network/networkd-brvlan.c
Brad Bishopa34c0302019-09-23 22:34:48 -0400106index c3c5d535ac..ebea408c89 100644
Brad Bishop19323692019-04-05 15:28:33 -0400107--- a/src/network/networkd-brvlan.c
108+++ b/src/network/networkd-brvlan.c
109@@ -4,6 +4,7 @@
110 ***/
111
112 #include <netinet/in.h>
113+#include <netinet/if_ether.h>
114 #include <linux/if_bridge.h>
115 #include <stdbool.h>
116
Brad Bishopa34c0302019-09-23 22:34:48 -0400117diff --git a/src/network/networkd-dhcp-common.c b/src/network/networkd-dhcp-common.c
118index 626b975839..42fe92f320 100644
119--- a/src/network/networkd-dhcp-common.c
120+++ b/src/network/networkd-dhcp-common.c
121@@ -1,6 +1,7 @@
122 /* SPDX-License-Identifier: LGPL-2.1+ */
123
124 #include "networkd-dhcp-common.h"
125+#include <netinet/if_ether.h>
126 #include "networkd-network.h"
127 #include "parse-util.h"
128 #include "string-table.h"
129diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c
130index 662770b50e..c6ab62a94d 100644
131--- a/src/network/networkd-dhcp4.c
132+++ b/src/network/networkd-dhcp4.c
133@@ -1,8 +1,8 @@
134 /* SPDX-License-Identifier: LGPL-2.1+ */
135
136+#include <netinet/if_ether.h>
137 #include <netinet/in.h>
138 #include <linux/if.h>
139-#include <linux/if_arp.h>
140
141 #include "alloc-util.h"
142 #include "hostname-util.h"
143diff --git a/src/network/networkd-dhcp6.c b/src/network/networkd-dhcp6.c
144index 8ad736a82b..f41b4d834e 100644
145--- a/src/network/networkd-dhcp6.c
146+++ b/src/network/networkd-dhcp6.c
147@@ -3,9 +3,9 @@
148 Copyright © 2014 Intel Corporation. All rights reserved.
149 ***/
150
151+#include <netinet/if_ether.h>
152 #include <netinet/in.h>
153 #include <linux/if.h>
154-#include <linux/if_arp.h>
155 #include "sd-radv.h"
156
157 #include "sd-dhcp6-client.h"
158diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
159index f5bb78890a..f13a36b791 100644
160--- a/src/network/networkd-link.c
161+++ b/src/network/networkd-link.c
162@@ -1,8 +1,8 @@
163 /* SPDX-License-Identifier: LGPL-2.1+ */
164
165+#include <netinet/if_ether.h>
166 #include <netinet/in.h>
167 #include <linux/if.h>
168-#include <linux/if_arp.h>
169 #include <unistd.h>
170
171 #include "alloc-util.h"
172diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
173index 2b8d0eb2fb..2f79ef25cd 100644
174--- a/src/network/networkd-network.c
175+++ b/src/network/networkd-network.c
176@@ -1,5 +1,6 @@
177 /* SPDX-License-Identifier: LGPL-2.1+ */
178
179+#include <netinet/if_ether.h>
180 #include <net/if.h>
181 #include <netinet/in.h>
182 #include <linux/netdevice.h>
183diff --git a/src/shared/ethtool-util.c b/src/shared/ethtool-util.c
184index b0961df72e..53fcbbd84b 100644
185--- a/src/shared/ethtool-util.c
186+++ b/src/shared/ethtool-util.c
Brad Bishop19323692019-04-05 15:28:33 -0400187@@ -1,5 +1,6 @@
188 /* SPDX-License-Identifier: LGPL-2.1+ */
189
190+#include <netinet/if_ether.h>
191 #include <net/if.h>
192 #include <sys/ioctl.h>
193 #include <linux/ethtool.h>
Brad Bishopa34c0302019-09-23 22:34:48 -0400194diff --git a/src/shared/ethtool-util.h b/src/shared/ethtool-util.h
195index 8b32b243f3..262b819976 100644
196--- a/src/shared/ethtool-util.h
197+++ b/src/shared/ethtool-util.h
Brad Bishop19323692019-04-05 15:28:33 -0400198@@ -2,6 +2,7 @@
199 #pragma once
200
201 #include <macro.h>
202+#include <netinet/if_ether.h>
203 #include <linux/ethtool.h>
204
205 #include "conf-parser.h"
Brad Bishopa34c0302019-09-23 22:34:48 -0400206diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c
207index d44af64d5e..fd052f1591 100644
208--- a/src/udev/net/link-config.c
209+++ b/src/udev/net/link-config.c
210@@ -1,5 +1,6 @@
211 /* SPDX-License-Identifier: LGPL-2.1+ */
212
213+#include <netinet/if_ether.h>
214 #include <linux/netdevice.h>
215 #include <netinet/ether.h>
216
Brad Bishop19323692019-04-05 15:28:33 -0400217diff --git a/src/udev/udev-builtin-net_setup_link.c b/src/udev/udev-builtin-net_setup_link.c
Brad Bishopa34c0302019-09-23 22:34:48 -0400218index ee3ca9fa38..9aa4e82874 100644
Brad Bishop19323692019-04-05 15:28:33 -0400219--- a/src/udev/udev-builtin-net_setup_link.c
220+++ b/src/udev/udev-builtin-net_setup_link.c
221@@ -1,5 +1,6 @@
222 /* SPDX-License-Identifier: LGPL-2.1+ */
223
224+#include <netinet/if_ether.h>
225 #include "device-util.h"
226 #include "alloc-util.h"
227 #include "link-config.h"