Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 1 | Include netinet/if_ether.h |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 2 | |
| 3 | Fixes |
| 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 Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 8 | and 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 | |
| 13 | The latter requires removing some includes of net/if_arp.h to avoid |
| 14 | conflicting with netinet/if_ether.h. |
| 15 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 16 | Upstream-Status: Inappropriate [musl specific] |
| 17 | |
| 18 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 19 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 20 | [rebased for systemd 243] |
| 21 | Signed-off-by: Scott Murray <scott.murray@konsulko.com> |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 22 | |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 23 | Upstream-Status: Inappropriate [musl specific] |
| 24 | |
| 25 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 26 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> |
| 27 | [rebased for systemd 243] |
| 28 | Signed-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 | |
| 47 | diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c |
| 48 | index 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 Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 59 | diff --git a/src/libsystemd/sd-netlink/netlink-types.c b/src/libsystemd/sd-netlink/netlink-types.c |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 60 | index de9b8b21ab..f64f6500f7 100644 |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 61 | --- 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 Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 68 | #include <linux/can/vxcan.h> |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 69 | #include <linux/netlink.h> |
| 70 | #include <linux/rtnetlink.h> |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 71 | diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c |
| 72 | index 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 Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 79 | +#include <netinet/if_ether.h> |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 80 | |
| 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 |
| 83 | diff --git a/src/network/netdev/macsec.c b/src/network/netdev/macsec.c |
| 84 | index 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> |
| 94 | diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c |
| 95 | index 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 Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 102 | #include <net/if.h> |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 103 | #include <netinet/in.h> |
| 104 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 105 | diff --git a/src/network/networkd-brvlan.c b/src/network/networkd-brvlan.c |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 106 | index c3c5d535ac..ebea408c89 100644 |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 107 | --- 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 Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 117 | diff --git a/src/network/networkd-dhcp-common.c b/src/network/networkd-dhcp-common.c |
| 118 | index 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" |
| 129 | diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c |
| 130 | index 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" |
| 143 | diff --git a/src/network/networkd-dhcp6.c b/src/network/networkd-dhcp6.c |
| 144 | index 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" |
| 158 | diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c |
| 159 | index 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" |
| 172 | diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c |
| 173 | index 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> |
| 183 | diff --git a/src/shared/ethtool-util.c b/src/shared/ethtool-util.c |
| 184 | index b0961df72e..53fcbbd84b 100644 |
| 185 | --- a/src/shared/ethtool-util.c |
| 186 | +++ b/src/shared/ethtool-util.c |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 187 | @@ -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 Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 194 | diff --git a/src/shared/ethtool-util.h b/src/shared/ethtool-util.h |
| 195 | index 8b32b243f3..262b819976 100644 |
| 196 | --- a/src/shared/ethtool-util.h |
| 197 | +++ b/src/shared/ethtool-util.h |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 198 | @@ -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 Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 206 | diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c |
| 207 | index 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 Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 217 | diff --git a/src/udev/udev-builtin-net_setup_link.c b/src/udev/udev-builtin-net_setup_link.c |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 218 | index ee3ca9fa38..9aa4e82874 100644 |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 219 | --- 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" |