summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch')
-rw-r--r--meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch326
1 files changed, 0 insertions, 326 deletions
diff --git a/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch b/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch
deleted file mode 100644
index b689cf1297..0000000000
--- a/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch
+++ /dev/null
@@ -1,326 +0,0 @@
1From d3ed0da271738fd0fc3d3e4d82d6f5810334b05e 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 06/26] Include netinet/if_ether.h
5
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
11and 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
19Upstream-Status: Inappropriate [musl specific]
20
21Signed-off-by: Khem Raj <raj.khem@gmail.com>
22Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
23[rebased for systemd 243]
24Signed-off-by: Scott Murray <scott.murray@konsulko.com>
25
26Upstream-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>
32[rebased for systemd 247]
33Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
34---
35 src/libsystemd-network/sd-dhcp6-client.c | 1 -
36 src/libsystemd/sd-netlink/netlink-types.c | 1 +
37 src/machine/machine-dbus.c | 1 +
38 src/network/netdev/bond.c | 1 +
39 src/network/netdev/bridge.c | 1 +
40 src/network/netdev/macsec.c | 1 +
41 src/network/netdev/netdev-gperf.gperf | 1 +
42 src/network/netdev/netdev.c | 1 +
43 src/network/networkd-brvlan.c | 1 +
44 src/network/networkd-dhcp-common.c | 1 +
45 src/network/networkd-dhcp4.c | 2 +-
46 src/network/networkd-dhcp6.c | 2 +-
47 src/network/networkd-link.c | 2 +-
48 src/network/networkd-network.c | 1 +
49 src/network/test-network-tables.c | 1 +
50 src/shared/ethtool-util.c | 1 +
51 src/shared/ethtool-util.h | 1 +
52 src/udev/net/link-config.c | 1 +
53 src/udev/udev-builtin-net_setup_link.c | 1 +
54 19 files changed, 18 insertions(+), 4 deletions(-)
55
56diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c
57index 30ac526fc9..126077e13c 100644
58--- a/src/libsystemd-network/sd-dhcp6-client.c
59+++ b/src/libsystemd-network/sd-dhcp6-client.c
60@@ -5,7 +5,6 @@
61
62 #include <errno.h>
63 #include <sys/ioctl.h>
64-#include <linux/if_arp.h>
65 #include <linux/if_infiniband.h>
66
67 #include "sd-dhcp6-client.h"
68diff --git a/src/libsystemd/sd-netlink/netlink-types.c b/src/libsystemd/sd-netlink/netlink-types.c
69index 6fb6c147d9..8eda02d202 100644
70--- a/src/libsystemd/sd-netlink/netlink-types.c
71+++ b/src/libsystemd/sd-netlink/netlink-types.c
72@@ -3,6 +3,7 @@
73 #include <netinet/in.h>
74 #include <stdint.h>
75 #include <sys/socket.h>
76+#include <netinet/if_ether.h>
77 #include <linux/can/vxcan.h>
78 #include <linux/netlink.h>
79 #include <linux/rtnetlink.h>
80diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c
81index bb67beb665..f5780f1aec 100644
82--- a/src/machine/machine-dbus.c
83+++ b/src/machine/machine-dbus.c
84@@ -3,6 +3,7 @@
85 #include <errno.h>
86 #include <sys/mount.h>
87 #include <sys/wait.h>
88+#include <netinet/if_ether.h>
89
90 /* When we include libgen.h because we need dirname() we immediately
91 * undefine basename() since libgen.h defines it as a macro to the POSIX
92diff --git a/src/network/netdev/bond.c b/src/network/netdev/bond.c
93index e27f36067b..8868f1da5d 100644
94--- a/src/network/netdev/bond.c
95+++ b/src/network/netdev/bond.c
96@@ -1,5 +1,6 @@
97 /* SPDX-License-Identifier: LGPL-2.1-or-later */
98
99+#include <netinet/if_ether.h>
100 #include "alloc-util.h"
101 #include "bond.h"
102 #include "bond-util.h"
103diff --git a/src/network/netdev/bridge.c b/src/network/netdev/bridge.c
104index 1f59cd8b42..5fdbae7e99 100644
105--- a/src/network/netdev/bridge.c
106+++ b/src/network/netdev/bridge.c
107@@ -1,5 +1,6 @@
108 /* SPDX-License-Identifier: LGPL-2.1-or-later */
109
110+#include <netinet/if_ether.h>
111 #include <net/if.h>
112
113 #include "bridge.h"
114diff --git a/src/network/netdev/macsec.c b/src/network/netdev/macsec.c
115index 82e71c3920..fbae86e216 100644
116--- a/src/network/netdev/macsec.c
117+++ b/src/network/netdev/macsec.c
118@@ -1,5 +1,6 @@
119 /* SPDX-License-Identifier: LGPL-2.1-or-later */
120
121+#include <netinet/if_ether.h>
122 #include <netinet/in.h>
123 #include <linux/if_ether.h>
124 #include <linux/if_macsec.h>
125diff --git a/src/network/netdev/netdev-gperf.gperf b/src/network/netdev/netdev-gperf.gperf
126index 4e89761f2c..91251fa6ec 100644
127--- a/src/network/netdev/netdev-gperf.gperf
128+++ b/src/network/netdev/netdev-gperf.gperf
129@@ -2,6 +2,7 @@
130 #if __GNUC__ >= 7
131 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
132 #endif
133+#include <netinet/if_ether.h>
134 #include <stddef.h>
135 #include "bareudp.h"
136 #include "bond.h"
137diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c
138index 9f390b5781..62aeafb1e4 100644
139--- a/src/network/netdev/netdev.c
140+++ b/src/network/netdev/netdev.c
141@@ -1,5 +1,6 @@
142 /* SPDX-License-Identifier: LGPL-2.1-or-later */
143
144+#include <netinet/if_ether.h>
145 #include <net/if.h>
146 #include <netinet/in.h>
147 #include <unistd.h>
148diff --git a/src/network/networkd-brvlan.c b/src/network/networkd-brvlan.c
149index e53c73c30c..9bf0771b84 100644
150--- a/src/network/networkd-brvlan.c
151+++ b/src/network/networkd-brvlan.c
152@@ -4,6 +4,7 @@
153 ***/
154
155 #include <netinet/in.h>
156+#include <netinet/if_ether.h>
157 #include <linux/if_bridge.h>
158 #include <stdbool.h>
159
160diff --git a/src/network/networkd-dhcp-common.c b/src/network/networkd-dhcp-common.c
161index c338c775a7..ab35d65c53 100644
162--- a/src/network/networkd-dhcp-common.c
163+++ b/src/network/networkd-dhcp-common.c
164@@ -1,7 +1,8 @@
165 /* SPDX-License-Identifier: LGPL-2.1-or-later */
166
167 #include <netinet/in.h>
168-#include <linux/if_arp.h>
169+#include <net/if_arp.h>
170+#include <net/if.h>
171
172 #include "dhcp-internal.h"
173 #include "dhcp6-internal.h"
174@@ -10,6 +10,7 @@
175 #include "networkd-dhcp-common.h"
176 #include "networkd-link.h"
177 #include "networkd-manager.h"
178+#include <netinet/if_ether.h>
179 #include "networkd-network.h"
180 #include "parse-util.h"
181 #include "socket-util.h"
182diff --git a/src/network/networkd-dhcp-server.c b/src/network/networkd-dhcp-server.c
183index cf279c640d..bae541029b 100644
184--- a/src/network/networkd-dhcp-server.c
185+++ b/src/network/networkd-dhcp-server.c
186@@ -1,8 +1,8 @@
187 /* SPDX-License-Identifier: LGPL-2.1-or-later */
188
189 #include <netinet/in.h>
190-#include <linux/if_arp.h>
191-#include <linux/if.h>
192+#include <net/if_arp.h>
193+#include <net/if.h>
194
195 #include "sd-dhcp-server.h"
196
197diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c
198index 02d33841b6..a30d8dd82c 100644
199--- a/src/network/networkd-dhcp4.c
200+++ b/src/network/networkd-dhcp4.c
201@@ -1,9 +1,9 @@
202 /* SPDX-License-Identifier: LGPL-2.1-or-later */
203
204+#include <netinet/if_ether.h>
205 #include <netinet/in.h>
206 #include <netinet/ip.h>
207 #include <linux/if.h>
208-#include <linux/if_arp.h>
209
210 #include "escape.h"
211 #include "alloc-util.h"
212diff --git a/src/network/networkd-dhcp6.c b/src/network/networkd-dhcp6.c
213index d4d4182ee5..635d08f7d5 100644
214--- a/src/network/networkd-dhcp6.c
215+++ b/src/network/networkd-dhcp6.c
216@@ -3,9 +3,9 @@
217 Copyright © 2014 Intel Corporation. All rights reserved.
218 ***/
219
220+#include <netinet/if_ether.h>
221 #include <netinet/in.h>
222 #include <linux/if.h>
223-#include <linux/if_arp.h>
224
225 #include "sd-dhcp6-client.h"
226
227diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
228index ced18de425..07b43770de 100644
229--- a/src/network/networkd-link.c
230+++ b/src/network/networkd-link.c
231@@ -1,8 +1,8 @@
232 /* SPDX-License-Identifier: LGPL-2.1-or-later */
233
234+#include <netinet/if_ether.h>
235 #include <netinet/in.h>
236 #include <linux/if.h>
237-#include <linux/if_arp.h>
238 #include <linux/if_link.h>
239 #include <unistd.h>
240
241diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
242index 3254641461..f0ada419fd 100644
243--- a/src/network/networkd-network.c
244+++ b/src/network/networkd-network.c
245@@ -1,5 +1,6 @@
246 /* SPDX-License-Identifier: LGPL-2.1-or-later */
247
248+#include <netinet/if_ether.h>
249 #include <net/if.h>
250 #include <netinet/in.h>
251 #include <linux/netdevice.h>
252diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c
253index 10f30c1a7e..579885726c 100644
254--- a/src/network/networkd-route.c
255+++ b/src/network/networkd-route.c
256@@ -1,7 +1,10 @@
257 /* SPDX-License-Identifier: LGPL-2.1-or-later */
258
259 #include <linux/icmpv6.h>
260-#include <linux/ipv6_route.h>
261+/* linux/ipv6_route.h conflicts with netinet/in.h so define manually */
262+#ifndef IP6_RT_PRIO_USER
263+#define IP6_RT_PRIO_USER 1024
264+#endif
265
266 #include "alloc-util.h"
267 #include "netlink-util.h"
268diff --git a/src/network/test-network-tables.c b/src/network/test-network-tables.c
269index 475cac7527..9bae6eda16 100644
270--- a/src/network/test-network-tables.c
271+++ b/src/network/test-network-tables.c
272@@ -1,5 +1,6 @@
273 /* SPDX-License-Identifier: LGPL-2.1-or-later */
274
275+#include <netinet/if_ether.h>
276 #include "bond.h"
277 #include "dhcp6-internal.h"
278 #include "dhcp6-protocol.h"
279diff --git a/src/shared/ethtool-util.c b/src/shared/ethtool-util.c
280index e6fab262f2..41dd3d7df7 100644
281--- a/src/shared/ethtool-util.c
282+++ b/src/shared/ethtool-util.c
283@@ -1,5 +1,6 @@
284 /* SPDX-License-Identifier: LGPL-2.1-or-later */
285
286+#include <netinet/if_ether.h>
287 #include <net/if.h>
288 #include <sys/ioctl.h>
289 #include <linux/ethtool.h>
290diff --git a/src/shared/ethtool-util.h b/src/shared/ethtool-util.h
291index f94b3e15bf..08a7e4fa09 100644
292--- a/src/shared/ethtool-util.h
293+++ b/src/shared/ethtool-util.h
294@@ -3,6 +3,7 @@
295
296 #include <macro.h>
297 #include <net/ethernet.h>
298+#include <netinet/if_ether.h>
299 #include <linux/ethtool.h>
300
301 #include "conf-parser.h"
302diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c
303index d12fd0e299..636806dc23 100644
304--- a/src/udev/net/link-config.c
305+++ b/src/udev/net/link-config.c
306@@ -1,5 +1,6 @@
307 /* SPDX-License-Identifier: LGPL-2.1-or-later */
308
309+#include <netinet/if_ether.h>
310 #include <linux/netdevice.h>
311 #include <netinet/ether.h>
312 #include <unistd.h>
313diff --git a/src/udev/udev-builtin-net_setup_link.c b/src/udev/udev-builtin-net_setup_link.c
314index cb12b943fe..5a28c8b563 100644
315--- a/src/udev/udev-builtin-net_setup_link.c
316+++ b/src/udev/udev-builtin-net_setup_link.c
317@@ -1,5 +1,6 @@
318 /* SPDX-License-Identifier: LGPL-2.1-or-later */
319
320+#include <netinet/if_ether.h>
321 #include "device-util.h"
322 #include "alloc-util.h"
323 #include "link-config.h"
324--
3252.27.0
326