From e5f067cb3dc845dd865e450f4e64077b28feb4c0 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 21 Jan 2022 22:19:37 -0800
Subject: [PATCH] Adjust for musl headers

Upstream-Status: Inappropriate [musl specific]

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 src/libsystemd-network/sd-dhcp6-client.c      | 2 +-
 src/network/netdev/bareudp.c                  | 2 +-
 src/network/netdev/batadv.c                   | 2 +-
 src/network/netdev/bond.c                     | 2 +-
 src/network/netdev/bridge.c                   | 2 +-
 src/network/netdev/dummy.c                    | 2 +-
 src/network/netdev/geneve.c                   | 2 +-
 src/network/netdev/ifb.c                      | 2 +-
 src/network/netdev/ipoib.c                    | 2 +-
 src/network/netdev/ipvlan.c                   | 2 +-
 src/network/netdev/macsec.c                   | 2 +-
 src/network/netdev/macvlan.c                  | 2 +-
 src/network/netdev/netdev.c                   | 2 +-
 src/network/netdev/netdevsim.c                | 2 +-
 src/network/netdev/nlmon.c                    | 2 +-
 src/network/netdev/tunnel.c                   | 2 +-
 src/network/netdev/vcan.c                     | 2 +-
 src/network/netdev/veth.c                     | 2 +-
 src/network/netdev/vlan.c                     | 2 +-
 src/network/netdev/vrf.c                      | 2 +-
 src/network/netdev/vxcan.c                    | 2 +-
 src/network/netdev/vxlan.c                    | 2 +-
 src/network/netdev/wireguard.c                | 2 +-
 src/network/netdev/xfrm.c                     | 2 +-
 src/network/networkd-bridge-mdb.c             | 4 ++--
 src/network/networkd-dhcp-common.c            | 3 ++-
 src/network/networkd-dhcp-prefix-delegation.c | 4 ++--
 src/network/networkd-dhcp-server.c            | 2 +-
 src/network/networkd-dhcp4.c                  | 2 +-
 src/network/networkd-ipv6ll.c                 | 2 +-
 src/network/networkd-link.c                   | 2 +-
 src/network/networkd-ndisc.c                  | 2 +-
 src/network/networkd-route.c                  | 8 ++++----
 src/network/networkd-setlink.c                | 2 +-
 src/shared/linux/ethtool.h                    | 3 ++-
 src/shared/netif-util.c                       | 2 +-
 src/udev/udev-builtin-net_id.c                | 2 +-
 37 files changed, 44 insertions(+), 42 deletions(-)

diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c
index 57dd91f81f..2b7f4fa3a7 100644
--- a/src/libsystemd-network/sd-dhcp6-client.c
+++ b/src/libsystemd-network/sd-dhcp6-client.c
@@ -5,7 +5,7 @@
 
 #include <errno.h>
 #include <sys/ioctl.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 #include <linux/if_infiniband.h>
 
 #include "sd-dhcp6-client.h"
diff --git a/src/network/netdev/bareudp.c b/src/network/netdev/bareudp.c
index 24d3afb877..f6241b41ee 100644
--- a/src/network/netdev/bareudp.c
+++ b/src/network/netdev/bareudp.c
@@ -2,7 +2,7 @@
  * Copyright © 2020 VMware, Inc. */
 
 #include <netinet/in.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "bareudp.h"
 #include "netlink-util.h"
diff --git a/src/network/netdev/batadv.c b/src/network/netdev/batadv.c
index 7e97619657..50fcffcfdf 100644
--- a/src/network/netdev/batadv.c
+++ b/src/network/netdev/batadv.c
@@ -3,7 +3,7 @@
 #include <inttypes.h>
 #include <netinet/in.h>
 #include <linux/genetlink.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "batadv.h"
 #include "fileio.h"
diff --git a/src/network/netdev/bond.c b/src/network/netdev/bond.c
index 601bff0a9c..dfed8d9e54 100644
--- a/src/network/netdev/bond.c
+++ b/src/network/netdev/bond.c
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <netinet/in.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "alloc-util.h"
 #include "bond.h"
diff --git a/src/network/netdev/bridge.c b/src/network/netdev/bridge.c
index b65c3b49fc..6875b4fbdb 100644
--- a/src/network/netdev/bridge.c
+++ b/src/network/netdev/bridge.c
@@ -2,7 +2,7 @@
 
 #include <net/if.h>
 #include <netinet/in.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 #include <linux/if_bridge.h>
 
 #include "bridge.h"
diff --git a/src/network/netdev/dummy.c b/src/network/netdev/dummy.c
index 00df1d2787..77b506b422 100644
--- a/src/network/netdev/dummy.c
+++ b/src/network/netdev/dummy.c
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "dummy.h"
 
diff --git a/src/network/netdev/geneve.c b/src/network/netdev/geneve.c
index 777a32d75c..73bfa2b5c1 100644
--- a/src/network/netdev/geneve.c
+++ b/src/network/netdev/geneve.c
@@ -2,7 +2,7 @@
 
 #include <net/if.h>
 #include <netinet/in.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "alloc-util.h"
 #include "conf-parser.h"
diff --git a/src/network/netdev/ifb.c b/src/network/netdev/ifb.c
index d7ff44cb9e..e037629ae4 100644
--- a/src/network/netdev/ifb.c
+++ b/src/network/netdev/ifb.c
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2019 VMware, Inc. */
 
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "ifb.h"
 
diff --git a/src/network/netdev/ipoib.c b/src/network/netdev/ipoib.c
index 5dd9286d57..4036d66dad 100644
--- a/src/network/netdev/ipoib.c
+++ b/src/network/netdev/ipoib.c
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 #include <linux/if_link.h>
 
 #include "ipoib.h"
diff --git a/src/network/netdev/ipvlan.c b/src/network/netdev/ipvlan.c
index 058eadebd7..c470ebb6d7 100644
--- a/src/network/netdev/ipvlan.c
+++ b/src/network/netdev/ipvlan.c
@@ -2,7 +2,7 @@
 
 #include <net/if.h>
 #include <netinet/in.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "conf-parser.h"
 #include "ipvlan.h"
diff --git a/src/network/netdev/macsec.c b/src/network/netdev/macsec.c
index 0da3dd4bd2..eb20f04469 100644
--- a/src/network/netdev/macsec.c
+++ b/src/network/netdev/macsec.c
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <netinet/in.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 #include <linux/if_ether.h>
 #include <linux/if_macsec.h>
 #include <linux/genetlink.h>
diff --git a/src/network/netdev/macvlan.c b/src/network/netdev/macvlan.c
index 1114bb0cb1..6c79a219a4 100644
--- a/src/network/netdev/macvlan.c
+++ b/src/network/netdev/macvlan.c
@@ -2,7 +2,7 @@
 
 #include <net/if.h>
 #include <netinet/in.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "conf-parser.h"
 #include "macvlan.h"
diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c
index 038a27c118..67155f0db7 100644
--- a/src/network/netdev/netdev.c
+++ b/src/network/netdev/netdev.c
@@ -2,7 +2,7 @@
 
 #include <net/if.h>
 #include <netinet/in.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 #include <unistd.h>
 
 #include "alloc-util.h"
diff --git a/src/network/netdev/netdevsim.c b/src/network/netdev/netdevsim.c
index 15d5c132f9..a3ffa48b15 100644
--- a/src/network/netdev/netdevsim.c
+++ b/src/network/netdev/netdevsim.c
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "netdevsim.h"
 
diff --git a/src/network/netdev/nlmon.c b/src/network/netdev/nlmon.c
index ff372092e6..eef66811f4 100644
--- a/src/network/netdev/nlmon.c
+++ b/src/network/netdev/nlmon.c
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "nlmon.h"
 
diff --git a/src/network/netdev/tunnel.c b/src/network/netdev/tunnel.c
index 2addfeecaa..954987f26d 100644
--- a/src/network/netdev/tunnel.c
+++ b/src/network/netdev/tunnel.c
@@ -2,7 +2,7 @@
 
 #include <netinet/in.h>
 #include <linux/fou.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 #include <linux/if_tunnel.h>
 #include <linux/ip.h>
 #include <linux/ip6_tunnel.h>
diff --git a/src/network/netdev/vcan.c b/src/network/netdev/vcan.c
index 380547ee1e..137c1adf8a 100644
--- a/src/network/netdev/vcan.c
+++ b/src/network/netdev/vcan.c
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "vcan.h"
 
diff --git a/src/network/netdev/veth.c b/src/network/netdev/veth.c
index fb00e6667f..f52d9ee89a 100644
--- a/src/network/netdev/veth.c
+++ b/src/network/netdev/veth.c
@@ -3,7 +3,7 @@
 #include <errno.h>
 #include <net/if.h>
 #include <netinet/in.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 #include <linux/veth.h>
 
 #include "netlink-util.h"
diff --git a/src/network/netdev/vlan.c b/src/network/netdev/vlan.c
index a3d961dac3..386b567a42 100644
--- a/src/network/netdev/vlan.c
+++ b/src/network/netdev/vlan.c
@@ -2,7 +2,7 @@
 
 #include <errno.h>
 #include <net/if.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 #include <linux/if_vlan.h>
 
 #include "parse-util.h"
diff --git a/src/network/netdev/vrf.c b/src/network/netdev/vrf.c
index 05ef3ff13d..825fc4a398 100644
--- a/src/network/netdev/vrf.c
+++ b/src/network/netdev/vrf.c
@@ -2,7 +2,7 @@
 
 #include <net/if.h>
 #include <netinet/in.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "vrf.h"
 
diff --git a/src/network/netdev/vxcan.c b/src/network/netdev/vxcan.c
index 83269b0707..39c6dbe29c 100644
--- a/src/network/netdev/vxcan.c
+++ b/src/network/netdev/vxcan.c
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/can/vxcan.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "vxcan.h"
 
diff --git a/src/network/netdev/vxlan.c b/src/network/netdev/vxlan.c
index 589161938a..0ec9625b7a 100644
--- a/src/network/netdev/vxlan.c
+++ b/src/network/netdev/vxlan.c
@@ -2,7 +2,7 @@
 
 #include <net/if.h>
 #include <netinet/in.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "conf-parser.h"
 #include "alloc-util.h"
diff --git a/src/network/netdev/wireguard.c b/src/network/netdev/wireguard.c
index 51e7e02990..fc36c0623a 100644
--- a/src/network/netdev/wireguard.c
+++ b/src/network/netdev/wireguard.c
@@ -6,7 +6,7 @@
 #include <sys/ioctl.h>
 #include <net/if.h>
 #include <netinet/in.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 #include <linux/ipv6_route.h>
 
 #include "sd-resolve.h"
diff --git a/src/network/netdev/xfrm.c b/src/network/netdev/xfrm.c
index a961d8fef2..6c1815b257 100644
--- a/src/network/netdev/xfrm.c
+++ b/src/network/netdev/xfrm.c
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "missing_network.h"
 #include "xfrm.h"
diff --git a/src/network/networkd-bridge-mdb.c b/src/network/networkd-bridge-mdb.c
index bd1a9745dc..949d3da029 100644
--- a/src/network/networkd-bridge-mdb.c
+++ b/src/network/networkd-bridge-mdb.c
@@ -1,7 +1,5 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <net/if.h>
-#include <linux/if_bridge.h>
 
 #include "netlink-util.h"
 #include "networkd-bridge-mdb.h"
@@ -11,6 +9,8 @@
 #include "networkd-queue.h"
 #include "string-util.h"
 #include "vlan-util.h"
+#include <net/if.h>
+#include <linux/if_bridge.h>
 
 #define STATIC_BRIDGE_MDB_ENTRIES_PER_NETWORK_MAX 1024U
 
diff --git a/src/network/networkd-dhcp-common.c b/src/network/networkd-dhcp-common.c
index ca9a825e7b..8735e261ad 100644
--- 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 <linux/if_arp.h>
+#include <net/if.h>
 
 #include "bus-error.h"
 #include "bus-locator.h"
diff --git a/src/network/networkd-dhcp-prefix-delegation.c b/src/network/networkd-dhcp-prefix-delegation.c
index 66c5e979d9..581b6b8c29 100644
--- a/src/network/networkd-dhcp-prefix-delegation.c
+++ b/src/network/networkd-dhcp-prefix-delegation.c
@@ -1,7 +1,5 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/ipv6_route.h>
-
 #include "sd-dhcp6-client.h"
 
 #include "hashmap.h"
@@ -21,6 +19,8 @@
 #include "strv.h"
 #include "tunnel.h"
 
+#include <linux/ipv6_route.h>
+
 bool link_dhcp_pd_is_enabled(Link *link) {
         assert(link);
 
diff --git a/src/network/networkd-dhcp-server.c b/src/network/networkd-dhcp-server.c
index 620fbbddc7..c8af20fb34 100644
--- a/src/network/networkd-dhcp-server.c
+++ b/src/network/networkd-dhcp-server.c
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <netinet/in.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 #include <linux/if.h>
 
 #include "sd-dhcp-server.h"
diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c
index d4b4942173..3d78da5609 100644
--- a/src/network/networkd-dhcp4.c
+++ b/src/network/networkd-dhcp4.c
@@ -3,7 +3,7 @@
 #include <netinet/in.h>
 #include <netinet/ip.h>
 #include <linux/if.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "alloc-util.h"
 #include "dhcp-client-internal.h"
diff --git a/src/network/networkd-ipv6ll.c b/src/network/networkd-ipv6ll.c
index 32229a3fc7..662a345d6e 100644
--- a/src/network/networkd-ipv6ll.c
+++ b/src/network/networkd-ipv6ll.c
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/if.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "in-addr-util.h"
 #include "networkd-address.h"
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index 019bef0590..657fc41ae6 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -3,7 +3,7 @@
 #include <net/if.h>
 #include <netinet/in.h>
 #include <linux/if.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 #include <linux/if_link.h>
 #include <linux/netdevice.h>
 #include <sys/socket.h>
diff --git a/src/network/networkd-ndisc.c b/src/network/networkd-ndisc.c
index 99a07e16fc..e51cd81d96 100644
--- a/src/network/networkd-ndisc.c
+++ b/src/network/networkd-ndisc.c
@@ -6,7 +6,7 @@
 #include <arpa/inet.h>
 #include <netinet/icmp6.h>
 #include <linux/if.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "sd-ndisc.h"
 
diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c
index 5214a8ad2c..9dd758daae 100644
--- a/src/network/networkd-route.c
+++ b/src/network/networkd-route.c
@@ -1,9 +1,5 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/icmpv6.h>
-#include <linux/ipv6_route.h>
-#include <linux/nexthop.h>
-
 #include "alloc-util.h"
 #include "event-util.h"
 #include "netlink-util.h"
@@ -21,6 +17,10 @@
 #include "vrf.h"
 #include "wireguard.h"
 
+#include <linux/icmpv6.h>
+#include <linux/ipv6_route.h>
+#include <linux/nexthop.h>
+
 int route_new(Route **ret) {
         _cleanup_(route_freep) Route *route = NULL;
 
diff --git a/src/network/networkd-setlink.c b/src/network/networkd-setlink.c
index 541c4b8a72..06ebda8f0f 100644
--- a/src/network/networkd-setlink.c
+++ b/src/network/networkd-setlink.c
@@ -2,7 +2,7 @@
 
 #include <netinet/in.h>
 #include <linux/if.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 #include <linux/if_bridge.h>
 
 #include "missing_network.h"
diff --git a/src/shared/linux/ethtool.h b/src/shared/linux/ethtool.h
index 1458de3627..d5c2d2e0ac 100644
--- a/src/shared/linux/ethtool.h
+++ b/src/shared/linux/ethtool.h
@@ -16,7 +16,8 @@
 
 #include <linux/const.h>
 #include <linux/types.h>
-#include <linux/if_ether.h>
+#include <netinet/if_ether.h>
+//#include <linux/if_ether.h>
 
 #include <limits.h> /* for INT_MAX */
 
diff --git a/src/shared/netif-util.c b/src/shared/netif-util.c
index f56c5646c1..5af28ff119 100644
--- a/src/shared/netif-util.c
+++ b/src/shared/netif-util.c
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/if.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "arphrd-util.h"
 #include "device-util.h"
diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c
index a48d5dedf8..31a8bc1b3c 100644
--- a/src/udev/udev-builtin-net_id.c
+++ b/src/udev/udev-builtin-net_id.c
@@ -18,7 +18,7 @@
 #include <stdarg.h>
 #include <unistd.h>
 #include <linux/if.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 #include <linux/netdevice.h>
 #include <linux/pci_regs.h>
 
-- 
2.39.2

