| From 2069f0b0d5ab8f869aeba635a347e0b11d362b30 Mon Sep 17 00:00:00 2001 |
| From: Khem Raj <raj.khem@gmail.com> |
| 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 <raj.khem@gmail.com> |
| Signed-off-by: Chen Qi <Qi.Chen@windriver.com> |
| [rebased for systemd 243] |
| Signed-off-by: Scott Murray <scott.murray@konsulko.com> |
| |
| Upstream-Status: Inappropriate [musl specific] |
| |
| Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| Signed-off-by: Chen Qi <Qi.Chen@windriver.com> |
| [rebased for systemd 243] |
| Signed-off-by: Scott Murray <scott.murray@konsulko.com> |
| [rebased for systemd 247] |
| Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> |
| |
| --- |
| 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 | 4 +++- |
| src/network/networkd-dhcp-server.c | 4 ++-- |
| 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/networkd-route.c | 5 ++++- |
| 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 + |
| 21 files changed, 26 insertions(+), 8 deletions(-) |
| |
| --- a/src/libsystemd-network/sd-dhcp6-client.c |
| +++ b/src/libsystemd-network/sd-dhcp6-client.c |
| @@ -5,7 +5,6 @@ |
| |
| #include <errno.h> |
| #include <sys/ioctl.h> |
| -#include <linux/if_arp.h> |
| #include <linux/if_infiniband.h> |
| |
| #include "sd-dhcp6-client.h" |
| --- a/src/libsystemd/sd-netlink/netlink-types.c |
| +++ b/src/libsystemd/sd-netlink/netlink-types.c |
| @@ -3,6 +3,7 @@ |
| #include <netinet/in.h> |
| #include <stdint.h> |
| #include <sys/socket.h> |
| +#include <netinet/if_ether.h> |
| #include <linux/can/vxcan.h> |
| #include <linux/netlink.h> |
| #include <linux/rtnetlink.h> |
| --- a/src/machine/machine-dbus.c |
| +++ b/src/machine/machine-dbus.c |
| @@ -3,6 +3,7 @@ |
| #include <errno.h> |
| #include <sys/mount.h> |
| #include <sys/wait.h> |
| +#include <netinet/if_ether.h> |
| |
| /* When we include libgen.h because we need dirname() we immediately |
| * undefine basename() since libgen.h defines it as a macro to the POSIX |
| --- a/src/network/netdev/bond.c |
| +++ b/src/network/netdev/bond.c |
| @@ -1,5 +1,6 @@ |
| /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| |
| +#include <netinet/if_ether.h> |
| #include "alloc-util.h" |
| #include "bond.h" |
| #include "bond-util.h" |
| --- a/src/network/netdev/bridge.c |
| +++ b/src/network/netdev/bridge.c |
| @@ -1,5 +1,6 @@ |
| /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| |
| +#include <netinet/if_ether.h> |
| #include <net/if.h> |
| |
| #include "bridge.h" |
| --- a/src/network/netdev/macsec.c |
| +++ b/src/network/netdev/macsec.c |
| @@ -1,5 +1,6 @@ |
| /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| |
| +#include <netinet/if_ether.h> |
| #include <netinet/in.h> |
| #include <linux/if_ether.h> |
| #include <linux/if_macsec.h> |
| --- a/src/network/netdev/netdev-gperf.gperf |
| +++ b/src/network/netdev/netdev-gperf.gperf |
| @@ -3,6 +3,7 @@ |
| #if __GNUC__ >= 7 |
| _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"") |
| #endif |
| +#include <netinet/if_ether.h> |
| #include <stddef.h> |
| #include "bareudp.h" |
| #include "batadv.h" |
| --- a/src/network/netdev/netdev.c |
| +++ b/src/network/netdev/netdev.c |
| @@ -1,5 +1,6 @@ |
| /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| |
| +#include <netinet/if_ether.h> |
| #include <net/if.h> |
| #include <netinet/in.h> |
| #include <unistd.h> |
| --- a/src/network/networkd-dhcp-common.c |
| +++ b/src/network/networkd-dhcp-common.c |
| @@ -1,7 +1,8 @@ |
| /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| |
| #include <netinet/in.h> |
| -#include <linux/if_arp.h> |
| +#include <net/if_arp.h> |
| +#include <net/if.h> |
| |
| #include "bus-error.h" |
| #include "dhcp-identifier.h" |
| @@ -13,6 +14,7 @@ |
| #include "networkd-dhcp-common.h" |
| #include "networkd-link.h" |
| #include "networkd-manager.h" |
| +#include <netinet/if_ether.h> |
| #include "networkd-network.h" |
| #include "parse-util.h" |
| #include "socket-util.h" |
| --- a/src/network/networkd-dhcp-server.c |
| +++ b/src/network/networkd-dhcp-server.c |
| @@ -1,8 +1,8 @@ |
| /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| |
| #include <netinet/in.h> |
| -#include <linux/if_arp.h> |
| -#include <linux/if.h> |
| +#include <net/if_arp.h> |
| +#include <net/if.h> |
| |
| #include "sd-dhcp-server.h" |
| |
| --- a/src/network/networkd-dhcp4.c |
| +++ b/src/network/networkd-dhcp4.c |
| @@ -1,9 +1,9 @@ |
| /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| |
| +#include <netinet/if_ether.h> |
| #include <netinet/in.h> |
| #include <netinet/ip.h> |
| #include <linux/if.h> |
| -#include <linux/if_arp.h> |
| |
| #include "escape.h" |
| #include "alloc-util.h" |
| --- a/src/network/networkd-dhcp6.c |
| +++ b/src/network/networkd-dhcp6.c |
| @@ -3,9 +3,9 @@ |
| Copyright © 2014 Intel Corporation. All rights reserved. |
| ***/ |
| |
| +#include <netinet/if_ether.h> |
| #include <netinet/in.h> |
| #include <linux/if.h> |
| -#include <linux/if_arp.h> |
| |
| #include "sd-dhcp6-client.h" |
| |
| --- a/src/network/networkd-link.c |
| +++ b/src/network/networkd-link.c |
| @@ -1,9 +1,10 @@ |
| /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| |
| +#include <netinet/if_ether.h> |
| #include <netinet/in.h> |
| #include <linux/if.h> |
| -#include <linux/if_arp.h> |
| #include <linux/if_link.h> |
| +#include <linux/netdevice.h> |
| #include <sys/socket.h> |
| #include <unistd.h> |
| |
| --- a/src/network/networkd-network.c |
| +++ b/src/network/networkd-network.c |
| @@ -1,5 +1,6 @@ |
| /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| |
| +#include <netinet/if_ether.h> |
| #include <net/if.h> |
| #include <netinet/in.h> |
| #include <linux/netdevice.h> |
| --- a/src/network/test-network-tables.c |
| +++ b/src/network/test-network-tables.c |
| @@ -1,5 +1,6 @@ |
| /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| |
| +#include <netinet/if_ether.h> |
| #include "bond.h" |
| #include "dhcp6-internal.h" |
| #include "dhcp6-protocol.h" |
| --- a/src/shared/ethtool-util.c |
| +++ b/src/shared/ethtool-util.c |
| @@ -1,5 +1,6 @@ |
| /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| |
| +#include <netinet/if_ether.h> |
| #include <net/if.h> |
| #include <sys/ioctl.h> |
| #include <linux/ethtool.h> |
| --- a/src/shared/ethtool-util.h |
| +++ b/src/shared/ethtool-util.h |
| @@ -3,6 +3,7 @@ |
| |
| #include <macro.h> |
| #include <net/ethernet.h> |
| +#include <netinet/if_ether.h> |
| #include <linux/ethtool.h> |
| |
| #include "conf-parser.h" |
| --- a/src/udev/net/link-config.c |
| +++ b/src/udev/net/link-config.c |
| @@ -1,5 +1,6 @@ |
| /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| |
| +#include <netinet/if_ether.h> |
| #include <linux/netdevice.h> |
| #include <netinet/ether.h> |
| #include <unistd.h> |
| --- a/src/udev/udev-builtin-net_setup_link.c |
| +++ b/src/udev/udev-builtin-net_setup_link.c |
| @@ -1,5 +1,6 @@ |
| /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| |
| +#include <netinet/if_ether.h> |
| #include "alloc-util.h" |
| #include "device-util.h" |
| #include "errno-util.h" |
| --- a/src/network/networkd-bridge-vlan.c |
| +++ b/src/network/networkd-bridge-vlan.c |
| @@ -4,6 +4,7 @@ |
| ***/ |
| |
| #include <netinet/in.h> |
| +#include <netinet/if_ether.h> |
| #include <linux/if_bridge.h> |
| #include <stdbool.h> |
| |
| --- a/src/basic/linux/in6.h |
| +++ b/src/basic/linux/in6.h |
| @@ -1,10 +1,10 @@ |
| /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ |
| /* |
| - * Types and definitions for AF_INET6 |
| - * Linux INET6 implementation |
| + * Types and definitions for AF_INET6 |
| + * Linux INET6 implementation |
| * |
| * Authors: |
| - * Pedro Roque <roque@di.fc.ul.pt> |
| + * Pedro Roque <roque@di.fc.ul.pt> |
| * |
| * Sources: |
| * IPv6 Program Interfaces for BSD Systems |
| @@ -19,8 +19,8 @@ |
| * 2 of the License, or (at your option) any later version. |
| */ |
| |
| -#ifndef _UAPI_LINUX_IN6_H |
| -#define _UAPI_LINUX_IN6_H |
| +#ifndef _LINUX_IN6_H |
| +#define _LINUX_IN6_H |
| |
| #include <linux/types.h> |
| #include <linux/libc-compat.h> |
| @@ -97,7 +97,7 @@ struct in6_flowlabel_req { |
| |
| |
| /* |
| - * Bitmask constant declarations to help applications select out the |
| + * Bitmask constant declarations to help applications select out the |
| * flow label and priority fields. |
| * |
| * Note that this are in host byte order while the flowinfo field of |
| @@ -298,4 +298,4 @@ struct in6_flowlabel_req { |
| * ... |
| * MRT6_MAX |
| */ |
| -#endif /* _UAPI_LINUX_IN6_H */ |
| +#endif /* _LINUX_IN6_H */ |
| --- a/src/network/networkd-route.c |
| +++ b/src/network/networkd-route.c |
| @@ -1,5 +1,6 @@ |
| /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| |
| +#include <netinet/in.h> |
| #include <linux/icmpv6.h> |
| #include <linux/ipv6_route.h> |
| #include <linux/nexthop.h> |
| --- a/src/network/networkd-setlink.c |
| +++ b/src/network/networkd-setlink.c |
| @@ -1,8 +1,8 @@ |
| /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| |
| #include <netinet/in.h> |
| +#include <net/if_arp.h> |
| #include <linux/if.h> |
| -#include <linux/if_arp.h> |
| |
| #include "missing_network.h" |
| #include "netlink-util.h" |