blob: abc438e4ba3fd1730a45813fc2198f6474766e3b [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001From 47818052121d135632f5e46c369e3e4706a0f9e0 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 26 Oct 2017 22:10:42 -0700
4Subject: [PATCH] Include netinet/if_ether.h
Brad Bishop19323692019-04-05 15:28:33 -04005
6Fixes
7/path/to/systemd/recipe-sysroot/usr/include/netinet/if_ether.h:101:8: error: redefinition of 'struct ethhdr'
8 struct ethhdr {
9 ^~~~~~
10
Brad Bishopa34c0302019-09-23 22:34:48 -040011and related arphdr, arpreq, and arpreq_old errors
12/path/to/systemd/recipe-sysroot/usr/include/net/if_arp.h:22:8: error: redefinition of 'struct arphdr'
13 struct arphdr {
14 ^~~~~~
15
16The latter requires removing some includes of net/if_arp.h to avoid
17conflicting with netinet/if_ether.h.
18
Brad Bishop19323692019-04-05 15:28:33 -040019Upstream-Status: Inappropriate [musl specific]
20
21Signed-off-by: Khem Raj <raj.khem@gmail.com>
22Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Brad Bishopa34c0302019-09-23 22:34:48 -040023[rebased for systemd 243]
24Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Brad Bishop19323692019-04-05 15:28:33 -040025
Brad Bishopa34c0302019-09-23 22:34:48 -040026Upstream-Status: Inappropriate [musl specific]
27
28Signed-off-by: Khem Raj <raj.khem@gmail.com>
29Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
30[rebased for systemd 243]
31Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Andrew Geissler82c905d2020-04-13 13:39:40 -050032
Brad Bishopa34c0302019-09-23 22:34:48 -040033---
34 src/libsystemd-network/sd-dhcp6-client.c | 1 -
35 src/libsystemd/sd-netlink/netlink-types.c | 1 +
36 src/machine/machine-dbus.c | 1 +
Andrew Geissler82c905d2020-04-13 13:39:40 -050037 src/network/netdev/bond.c | 1 +
38 src/network/netdev/bridge.c | 1 +
Brad Bishopa34c0302019-09-23 22:34:48 -040039 src/network/netdev/macsec.c | 1 +
Andrew Geissler82c905d2020-04-13 13:39:40 -050040 src/network/netdev/netdev-gperf.gperf | 1 +
Brad Bishopa34c0302019-09-23 22:34:48 -040041 src/network/netdev/netdev.c | 1 +
42 src/network/networkd-brvlan.c | 1 +
43 src/network/networkd-dhcp-common.c | 1 +
44 src/network/networkd-dhcp4.c | 2 +-
45 src/network/networkd-dhcp6.c | 2 +-
46 src/network/networkd-link.c | 2 +-
47 src/network/networkd-network.c | 1 +
Andrew Geissler82c905d2020-04-13 13:39:40 -050048 src/network/test-network-tables.c | 1 +
Brad Bishopa34c0302019-09-23 22:34:48 -040049 src/shared/ethtool-util.c | 1 +
50 src/shared/ethtool-util.h | 1 +
51 src/udev/net/link-config.c | 1 +
52 src/udev/udev-builtin-net_setup_link.c | 1 +
Andrew Geissler82c905d2020-04-13 13:39:40 -050053 19 files changed, 18 insertions(+), 4 deletions(-)
Brad Bishopa34c0302019-09-23 22:34:48 -040054
Andrew Geissler635e0e42020-08-21 15:58:33 -050055Index: systemd-stable/src/libsystemd-network/sd-dhcp6-client.c
56===================================================================
57--- systemd-stable.orig/src/libsystemd-network/sd-dhcp6-client.c
58+++ systemd-stable/src/libsystemd-network/sd-dhcp6-client.c
Andrew Geissler82c905d2020-04-13 13:39:40 -050059@@ -5,7 +5,6 @@
60
Brad Bishopa34c0302019-09-23 22:34:48 -040061 #include <errno.h>
Brad Bishopa34c0302019-09-23 22:34:48 -040062 #include <sys/ioctl.h>
63-#include <linux/if_arp.h>
64 #include <linux/if_infiniband.h>
65
66 #include "sd-dhcp6-client.h"
Andrew Geissler635e0e42020-08-21 15:58:33 -050067Index: systemd-stable/src/libsystemd/sd-netlink/netlink-types.c
68===================================================================
69--- systemd-stable.orig/src/libsystemd/sd-netlink/netlink-types.c
70+++ systemd-stable/src/libsystemd/sd-netlink/netlink-types.c
Brad Bishop19323692019-04-05 15:28:33 -040071@@ -3,6 +3,7 @@
72 #include <netinet/in.h>
73 #include <stdint.h>
74 #include <sys/socket.h>
75+#include <netinet/if_ether.h>
Brad Bishopa34c0302019-09-23 22:34:48 -040076 #include <linux/can/vxcan.h>
Brad Bishop19323692019-04-05 15:28:33 -040077 #include <linux/netlink.h>
78 #include <linux/rtnetlink.h>
Andrew Geissler635e0e42020-08-21 15:58:33 -050079Index: systemd-stable/src/machine/machine-dbus.c
80===================================================================
81--- systemd-stable.orig/src/machine/machine-dbus.c
82+++ systemd-stable/src/machine/machine-dbus.c
Andrew Geissler82c905d2020-04-13 13:39:40 -050083@@ -3,6 +3,7 @@
84 #include <errno.h>
Brad Bishopa34c0302019-09-23 22:34:48 -040085 #include <sys/mount.h>
86 #include <sys/wait.h>
Brad Bishop19323692019-04-05 15:28:33 -040087+#include <netinet/if_ether.h>
Brad Bishopa34c0302019-09-23 22:34:48 -040088
89 /* When we include libgen.h because we need dirname() we immediately
90 * undefine basename() since libgen.h defines it as a macro to the POSIX
Andrew Geissler635e0e42020-08-21 15:58:33 -050091Index: systemd-stable/src/network/netdev/bond.c
92===================================================================
93--- systemd-stable.orig/src/network/netdev/bond.c
94+++ systemd-stable/src/network/netdev/bond.c
Andrew Geissler82c905d2020-04-13 13:39:40 -050095@@ -1,5 +1,6 @@
96 /* SPDX-License-Identifier: LGPL-2.1+ */
97
98+#include <netinet/if_ether.h>
99 #include "alloc-util.h"
100 #include "bond.h"
Andrew Geissler635e0e42020-08-21 15:58:33 -0500101 #include "bond-util.h"
102Index: systemd-stable/src/network/netdev/bridge.c
103===================================================================
104--- systemd-stable.orig/src/network/netdev/bridge.c
105+++ systemd-stable/src/network/netdev/bridge.c
Andrew Geissler82c905d2020-04-13 13:39:40 -0500106@@ -1,5 +1,6 @@
107 /* SPDX-License-Identifier: LGPL-2.1+ */
108
109+#include <netinet/if_ether.h>
110 #include <net/if.h>
111
112 #include "bridge.h"
Andrew Geissler635e0e42020-08-21 15:58:33 -0500113Index: systemd-stable/src/network/netdev/macsec.c
114===================================================================
115--- systemd-stable.orig/src/network/netdev/macsec.c
116+++ systemd-stable/src/network/netdev/macsec.c
Brad Bishopa34c0302019-09-23 22:34:48 -0400117@@ -1,5 +1,6 @@
118 /* SPDX-License-Identifier: LGPL-2.1+ */
119
120+#include <netinet/if_ether.h>
121 #include <netinet/in.h>
122 #include <linux/if_ether.h>
123 #include <linux/if_macsec.h>
Andrew Geissler635e0e42020-08-21 15:58:33 -0500124Index: systemd-stable/src/network/netdev/netdev-gperf.gperf
125===================================================================
126--- systemd-stable.orig/src/network/netdev/netdev-gperf.gperf
127+++ systemd-stable/src/network/netdev/netdev-gperf.gperf
Andrew Geissler82c905d2020-04-13 13:39:40 -0500128@@ -2,6 +2,7 @@
129 #if __GNUC__ >= 7
130 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
131 #endif
132+#include <netinet/if_ether.h>
133 #include <stddef.h>
134 #include "bond.h"
135 #include "bridge.h"
Andrew Geissler635e0e42020-08-21 15:58:33 -0500136Index: systemd-stable/src/network/netdev/netdev.c
137===================================================================
138--- systemd-stable.orig/src/network/netdev/netdev.c
139+++ systemd-stable/src/network/netdev/netdev.c
Brad Bishopa34c0302019-09-23 22:34:48 -0400140@@ -1,5 +1,6 @@
141 /* SPDX-License-Identifier: LGPL-2.1+ */
142
143+#include <netinet/if_ether.h>
Brad Bishop19323692019-04-05 15:28:33 -0400144 #include <net/if.h>
Brad Bishopa34c0302019-09-23 22:34:48 -0400145 #include <netinet/in.h>
Andrew Geissler635e0e42020-08-21 15:58:33 -0500146 #include <unistd.h>
147Index: systemd-stable/src/network/networkd-brvlan.c
148===================================================================
149--- systemd-stable.orig/src/network/networkd-brvlan.c
150+++ systemd-stable/src/network/networkd-brvlan.c
Brad Bishop19323692019-04-05 15:28:33 -0400151@@ -4,6 +4,7 @@
152 ***/
153
154 #include <netinet/in.h>
155+#include <netinet/if_ether.h>
156 #include <linux/if_bridge.h>
157 #include <stdbool.h>
158
Andrew Geissler635e0e42020-08-21 15:58:33 -0500159Index: systemd-stable/src/network/networkd-dhcp-common.c
160===================================================================
161--- systemd-stable.orig/src/network/networkd-dhcp-common.c
162+++ systemd-stable/src/network/networkd-dhcp-common.c
163@@ -5,6 +5,7 @@
Andrew Geissler82c905d2020-04-13 13:39:40 -0500164 #include "escape.h"
165 #include "in-addr-util.h"
Brad Bishopa34c0302019-09-23 22:34:48 -0400166 #include "networkd-dhcp-common.h"
167+#include <netinet/if_ether.h>
168 #include "networkd-network.h"
169 #include "parse-util.h"
170 #include "string-table.h"
Andrew Geissler635e0e42020-08-21 15:58:33 -0500171Index: systemd-stable/src/network/networkd-dhcp4.c
172===================================================================
173--- systemd-stable.orig/src/network/networkd-dhcp4.c
174+++ systemd-stable/src/network/networkd-dhcp4.c
Andrew Geissler82c905d2020-04-13 13:39:40 -0500175@@ -1,9 +1,9 @@
Brad Bishopa34c0302019-09-23 22:34:48 -0400176 /* SPDX-License-Identifier: LGPL-2.1+ */
177
178+#include <netinet/if_ether.h>
179 #include <netinet/in.h>
Andrew Geissler82c905d2020-04-13 13:39:40 -0500180 #include <netinet/ip.h>
Brad Bishopa34c0302019-09-23 22:34:48 -0400181 #include <linux/if.h>
182-#include <linux/if_arp.h>
183
Andrew Geissler635e0e42020-08-21 15:58:33 -0500184 #include "escape.h"
Brad Bishopa34c0302019-09-23 22:34:48 -0400185 #include "alloc-util.h"
Andrew Geissler635e0e42020-08-21 15:58:33 -0500186Index: systemd-stable/src/network/networkd-dhcp6.c
187===================================================================
188--- systemd-stable.orig/src/network/networkd-dhcp6.c
189+++ systemd-stable/src/network/networkd-dhcp6.c
Brad Bishopa34c0302019-09-23 22:34:48 -0400190@@ -3,9 +3,9 @@
191 Copyright © 2014 Intel Corporation. All rights reserved.
192 ***/
193
194+#include <netinet/if_ether.h>
195 #include <netinet/in.h>
196 #include <linux/if.h>
197-#include <linux/if_arp.h>
Brad Bishopa34c0302019-09-23 22:34:48 -0400198
199 #include "sd-dhcp6-client.h"
Andrew Geissler635e0e42020-08-21 15:58:33 -0500200
201Index: systemd-stable/src/network/networkd-link.c
202===================================================================
203--- systemd-stable.orig/src/network/networkd-link.c
204+++ systemd-stable/src/network/networkd-link.c
Brad Bishopa34c0302019-09-23 22:34:48 -0400205@@ -1,8 +1,8 @@
206 /* SPDX-License-Identifier: LGPL-2.1+ */
207
208+#include <netinet/if_ether.h>
209 #include <netinet/in.h>
210 #include <linux/if.h>
211-#include <linux/if_arp.h>
Andrew Geissler635e0e42020-08-21 15:58:33 -0500212 #include <linux/if_link.h>
Brad Bishopa34c0302019-09-23 22:34:48 -0400213 #include <unistd.h>
214
Andrew Geissler635e0e42020-08-21 15:58:33 -0500215Index: systemd-stable/src/network/networkd-network.c
216===================================================================
217--- systemd-stable.orig/src/network/networkd-network.c
218+++ systemd-stable/src/network/networkd-network.c
Brad Bishopa34c0302019-09-23 22:34:48 -0400219@@ -1,5 +1,6 @@
220 /* SPDX-License-Identifier: LGPL-2.1+ */
221
222+#include <netinet/if_ether.h>
223 #include <net/if.h>
224 #include <netinet/in.h>
225 #include <linux/netdevice.h>
Andrew Geissler635e0e42020-08-21 15:58:33 -0500226Index: systemd-stable/src/network/test-network-tables.c
227===================================================================
228--- systemd-stable.orig/src/network/test-network-tables.c
229+++ systemd-stable/src/network/test-network-tables.c
Andrew Geissler82c905d2020-04-13 13:39:40 -0500230@@ -1,3 +1,4 @@
231+#include <netinet/if_ether.h>
232 #include "bond.h"
233 #include "dhcp6-internal.h"
234 #include "dhcp6-protocol.h"
Andrew Geissler635e0e42020-08-21 15:58:33 -0500235Index: systemd-stable/src/shared/ethtool-util.c
236===================================================================
237--- systemd-stable.orig/src/shared/ethtool-util.c
238+++ systemd-stable/src/shared/ethtool-util.c
Brad Bishop19323692019-04-05 15:28:33 -0400239@@ -1,5 +1,6 @@
240 /* SPDX-License-Identifier: LGPL-2.1+ */
241
242+#include <netinet/if_ether.h>
243 #include <net/if.h>
244 #include <sys/ioctl.h>
245 #include <linux/ethtool.h>
Andrew Geissler635e0e42020-08-21 15:58:33 -0500246Index: systemd-stable/src/shared/ethtool-util.h
247===================================================================
248--- systemd-stable.orig/src/shared/ethtool-util.h
249+++ systemd-stable/src/shared/ethtool-util.h
Andrew Geissler82c905d2020-04-13 13:39:40 -0500250@@ -3,6 +3,7 @@
Brad Bishop19323692019-04-05 15:28:33 -0400251
252 #include <macro.h>
Andrew Geissler82c905d2020-04-13 13:39:40 -0500253 #include <net/ethernet.h>
Brad Bishop19323692019-04-05 15:28:33 -0400254+#include <netinet/if_ether.h>
255 #include <linux/ethtool.h>
256
257 #include "conf-parser.h"
Andrew Geissler635e0e42020-08-21 15:58:33 -0500258Index: systemd-stable/src/udev/net/link-config.c
259===================================================================
260--- systemd-stable.orig/src/udev/net/link-config.c
261+++ systemd-stable/src/udev/net/link-config.c
Brad Bishopa34c0302019-09-23 22:34:48 -0400262@@ -1,5 +1,6 @@
263 /* SPDX-License-Identifier: LGPL-2.1+ */
264
265+#include <netinet/if_ether.h>
266 #include <linux/netdevice.h>
267 #include <netinet/ether.h>
Andrew Geissler635e0e42020-08-21 15:58:33 -0500268 #include <unistd.h>
269Index: systemd-stable/src/udev/udev-builtin-net_setup_link.c
270===================================================================
271--- systemd-stable.orig/src/udev/udev-builtin-net_setup_link.c
272+++ systemd-stable/src/udev/udev-builtin-net_setup_link.c
Brad Bishop19323692019-04-05 15:28:33 -0400273@@ -1,5 +1,6 @@
274 /* SPDX-License-Identifier: LGPL-2.1+ */
275
276+#include <netinet/if_ether.h>
277 #include "device-util.h"
278 #include "alloc-util.h"
279 #include "link-config.h"