From 47818052121d135632f5e46c369e3e4706a0f9e0 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 26 Oct 2017 22:10:42 -0700 Subject: [PATCH] Include netinet/if_ether.h Fixes /path/to/systemd/recipe-sysroot/usr/include/netinet/if_ether.h:101:8: error: redefinition of 'struct ethhdr' struct ethhdr { ^~~~~~ and related arphdr, arpreq, and arpreq_old errors /path/to/systemd/recipe-sysroot/usr/include/net/if_arp.h:22:8: error: redefinition of 'struct arphdr' struct arphdr { ^~~~~~ The latter requires removing some includes of net/if_arp.h to avoid conflicting with netinet/if_ether.h. Upstream-Status: Inappropriate [musl specific] Signed-off-by: Khem Raj Signed-off-by: Chen Qi [rebased for systemd 243] Signed-off-by: Scott Murray Upstream-Status: Inappropriate [musl specific] Signed-off-by: Khem Raj Signed-off-by: Chen Qi [rebased for systemd 243] Signed-off-by: Scott Murray --- src/libsystemd-network/sd-dhcp6-client.c | 1 - src/libsystemd/sd-netlink/netlink-types.c | 1 + src/machine/machine-dbus.c | 1 + src/network/netdev/bond.c | 1 + src/network/netdev/bridge.c | 1 + src/network/netdev/macsec.c | 1 + src/network/netdev/netdev-gperf.gperf | 1 + src/network/netdev/netdev.c | 1 + src/network/networkd-brvlan.c | 1 + src/network/networkd-dhcp-common.c | 1 + src/network/networkd-dhcp4.c | 2 +- src/network/networkd-dhcp6.c | 2 +- src/network/networkd-link.c | 2 +- src/network/networkd-network.c | 1 + src/network/test-network-tables.c | 1 + src/shared/ethtool-util.c | 1 + src/shared/ethtool-util.h | 1 + src/udev/net/link-config.c | 1 + src/udev/udev-builtin-net_setup_link.c | 1 + 19 files changed, 18 insertions(+), 4 deletions(-) Index: systemd-stable/src/libsystemd-network/sd-dhcp6-client.c =================================================================== --- systemd-stable.orig/src/libsystemd-network/sd-dhcp6-client.c +++ systemd-stable/src/libsystemd-network/sd-dhcp6-client.c @@ -5,7 +5,6 @@ #include #include -#include #include #include "sd-dhcp6-client.h" Index: systemd-stable/src/libsystemd/sd-netlink/netlink-types.c =================================================================== --- systemd-stable.orig/src/libsystemd/sd-netlink/netlink-types.c +++ systemd-stable/src/libsystemd/sd-netlink/netlink-types.c @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include Index: systemd-stable/src/machine/machine-dbus.c =================================================================== --- systemd-stable.orig/src/machine/machine-dbus.c +++ systemd-stable/src/machine/machine-dbus.c @@ -3,6 +3,7 @@ #include #include #include +#include /* When we include libgen.h because we need dirname() we immediately * undefine basename() since libgen.h defines it as a macro to the POSIX Index: systemd-stable/src/network/netdev/bond.c =================================================================== --- systemd-stable.orig/src/network/netdev/bond.c +++ systemd-stable/src/network/netdev/bond.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include #include "alloc-util.h" #include "bond.h" #include "bond-util.h" Index: systemd-stable/src/network/netdev/bridge.c =================================================================== --- systemd-stable.orig/src/network/netdev/bridge.c +++ systemd-stable/src/network/netdev/bridge.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include #include #include "bridge.h" Index: systemd-stable/src/network/netdev/macsec.c =================================================================== --- systemd-stable.orig/src/network/netdev/macsec.c +++ systemd-stable/src/network/netdev/macsec.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include #include #include #include Index: systemd-stable/src/network/netdev/netdev-gperf.gperf =================================================================== --- systemd-stable.orig/src/network/netdev/netdev-gperf.gperf +++ systemd-stable/src/network/netdev/netdev-gperf.gperf @@ -2,6 +2,7 @@ #if __GNUC__ >= 7 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"") #endif +#include #include #include "bond.h" #include "bridge.h" Index: systemd-stable/src/network/netdev/netdev.c =================================================================== --- systemd-stable.orig/src/network/netdev/netdev.c +++ systemd-stable/src/network/netdev/netdev.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include #include #include #include Index: systemd-stable/src/network/networkd-brvlan.c =================================================================== --- systemd-stable.orig/src/network/networkd-brvlan.c +++ systemd-stable/src/network/networkd-brvlan.c @@ -4,6 +4,7 @@ ***/ #include +#include #include #include Index: systemd-stable/src/network/networkd-dhcp-common.c =================================================================== --- systemd-stable.orig/src/network/networkd-dhcp-common.c +++ systemd-stable/src/network/networkd-dhcp-common.c @@ -5,6 +5,7 @@ #include "escape.h" #include "in-addr-util.h" #include "networkd-dhcp-common.h" +#include #include "networkd-network.h" #include "parse-util.h" #include "string-table.h" Index: systemd-stable/src/network/networkd-dhcp4.c =================================================================== --- systemd-stable.orig/src/network/networkd-dhcp4.c +++ systemd-stable/src/network/networkd-dhcp4.c @@ -1,9 +1,9 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include #include #include #include -#include #include "escape.h" #include "alloc-util.h" Index: systemd-stable/src/network/networkd-dhcp6.c =================================================================== --- systemd-stable.orig/src/network/networkd-dhcp6.c +++ systemd-stable/src/network/networkd-dhcp6.c @@ -3,9 +3,9 @@ Copyright © 2014 Intel Corporation. All rights reserved. ***/ +#include #include #include -#include #include "sd-dhcp6-client.h" Index: systemd-stable/src/network/networkd-link.c =================================================================== --- systemd-stable.orig/src/network/networkd-link.c +++ systemd-stable/src/network/networkd-link.c @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include #include #include -#include #include #include Index: systemd-stable/src/network/networkd-network.c =================================================================== --- systemd-stable.orig/src/network/networkd-network.c +++ systemd-stable/src/network/networkd-network.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include #include #include #include Index: systemd-stable/src/network/test-network-tables.c =================================================================== --- systemd-stable.orig/src/network/test-network-tables.c +++ systemd-stable/src/network/test-network-tables.c @@ -1,3 +1,4 @@ +#include #include "bond.h" #include "dhcp6-internal.h" #include "dhcp6-protocol.h" Index: systemd-stable/src/shared/ethtool-util.c =================================================================== --- systemd-stable.orig/src/shared/ethtool-util.c +++ systemd-stable/src/shared/ethtool-util.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include #include #include #include Index: systemd-stable/src/shared/ethtool-util.h =================================================================== --- systemd-stable.orig/src/shared/ethtool-util.h +++ systemd-stable/src/shared/ethtool-util.h @@ -3,6 +3,7 @@ #include #include +#include #include #include "conf-parser.h" Index: systemd-stable/src/udev/net/link-config.c =================================================================== --- systemd-stable.orig/src/udev/net/link-config.c +++ systemd-stable/src/udev/net/link-config.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include #include #include #include Index: systemd-stable/src/udev/udev-builtin-net_setup_link.c =================================================================== --- systemd-stable.orig/src/udev/udev-builtin-net_setup_link.c +++ systemd-stable/src/udev/udev-builtin-net_setup_link.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include #include "device-util.h" #include "alloc-util.h" #include "link-config.h"