From be9d8f221ab9d31c0df8b2b3e66172bb9bc0f71f 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 17/26] Adjust for musl headers

Upstream-Status: Inappropriate [musl specific]

Signed-off-by: Khem Raj <raj.khem@gmail.com>

[Rebased for v255.1]
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 src/basic/linux/ethtool.h                     | 3 ++-
 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                   | 3 ++-
 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-dhcp-common.c            | 3 ++-
 src/network/networkd-dhcp-prefix-delegation.c | 3 ++-
 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-setlink.c                | 2 +-
 src/network/networkd-sysctl.c                 | 2 +-
 src/shared/netif-util.c                       | 2 +-
 src/udev/udev-builtin-net_id.c                | 2 +-
 36 files changed, 40 insertions(+), 36 deletions(-)

diff --git a/src/basic/linux/ethtool.h b/src/basic/linux/ethtool.h
index a32293ba20..2aad67e9c0 100644
--- a/src/basic/linux/ethtool.h
+++ b/src/basic/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/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c
index 3e992d7cad..c7e1ff4dbf 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 e122abd97f..c120c2969b 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 9806d8eb7c..19c3d881c2 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 b866940b7a..a0eaf0a866 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 d3ba4989d9..4f7301c4f1 100644
--- a/src/network/netdev/bridge.c
+++ b/src/network/netdev/bridge.c
@@ -2,7 +2,8 @@
 
 /* Make sure the net/if.h header is included before any linux/ one */
 #include <net/if.h>
-#include <linux/if_arp.h>
+#include <netinet/in.h>
+//#include <linux/if_arp.h>
 #include <linux/if_bridge.h>
 #include <netinet/in.h>
 
diff --git a/src/network/netdev/dummy.c b/src/network/netdev/dummy.c
index 8b2893d5b4..412123f036 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 1d68be9bc8..539151c49e 100644
--- a/src/network/netdev/geneve.c
+++ b/src/network/netdev/geneve.c
@@ -2,7 +2,7 @@
 
 /* Make sure the net/if.h header is included before any linux/ one */
 #include <net/if.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 #include <netinet/in.h>
 
 #include "alloc-util.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 6932c62e2a..fc458da9e8 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 6e50f72aaa..49acfee25e 100644
--- a/src/network/netdev/ipvlan.c
+++ b/src/network/netdev/ipvlan.c
@@ -3,7 +3,7 @@
 /* Make sure the net/if.h header is included before any linux/ one */
 #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 6dd434f803..f9fbe9f51a 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 fd112b58e1..b038740bda 100644
--- a/src/network/netdev/macvlan.c
+++ b/src/network/netdev/macvlan.c
@@ -3,7 +3,7 @@
 /* Make sure the net/if.h header is included before any linux/ one */
 #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 c2986aafb5..147f1c95d0 100644
--- a/src/network/netdev/netdev.c
+++ b/src/network/netdev/netdev.c
@@ -3,7 +3,7 @@
 /* Make sure the net/if.h header is included before any linux/ one */
 #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 59958c3bbe..61169016b0 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 af05cfda81..f659bed3a6 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 54d3b59734..f3f75e22b5 100644
--- a/src/network/netdev/veth.c
+++ b/src/network/netdev/veth.c
@@ -3,7 +3,7 @@
 /* Make sure the net/if.h header is included before any linux/ one */
 #include <net/if.h>
 #include <errno.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 #include <linux/veth.h>
 #include <netinet/in.h>
 
diff --git a/src/network/netdev/vlan.c b/src/network/netdev/vlan.c
index 60e49a5b8a..266fd58813 100644
--- a/src/network/netdev/vlan.c
+++ b/src/network/netdev/vlan.c
@@ -3,7 +3,7 @@
 /* Make sure the net/if.h header is included before any linux/ one */
 #include <net/if.h>
 #include <errno.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 c35419f859..4d1d3ef141 100644
--- a/src/network/netdev/vrf.c
+++ b/src/network/netdev/vrf.c
@@ -2,8 +2,8 @@
 
 /* Make sure the net/if.h header is included before any linux/ one */
 #include <net/if.h>
-#include <linux/if_arp.h>
 #include <netinet/in.h>
+//#include <linux/if_arp.h>
 
 #include "vrf.h"
 
diff --git a/src/network/netdev/vxcan.c b/src/network/netdev/vxcan.c
index 2de89b8e24..ce1b8f9b69 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 d8a066370d..8f94eeb763 100644
--- a/src/network/netdev/vxlan.c
+++ b/src/network/netdev/vxlan.c
@@ -3,7 +3,7 @@
 /* Make sure the net/if.h header is included before any linux/ one */
 #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 8d1dddf828..5182783f45 100644
--- a/src/network/netdev/wireguard.c
+++ b/src/network/netdev/wireguard.c
@@ -5,7 +5,7 @@
 
 /* Make sure the net/if.h header is included before any linux/ one */
 #include <net/if.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 #include <linux/ipv6_route.h>
 #include <netinet/in.h>
 #include <sys/ioctl.h>
diff --git a/src/network/netdev/xfrm.c b/src/network/netdev/xfrm.c
index 905bfc0bdf..39e34dbb3b 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-dhcp-common.c b/src/network/networkd-dhcp-common.c
index 8b64dfe8f0..caa2885728 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 16426de981..3d8efc05f1 100644
--- a/src/network/networkd-dhcp-prefix-delegation.c
+++ b/src/network/networkd-dhcp-prefix-delegation.c
@@ -1,6 +1,5 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/ipv6_route.h>
 
 #include "dhcp6-lease-internal.h"
 #include "hashmap.h"
@@ -21,6 +20,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 c35102af74..3be469ae16 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 d94ac1a213..b8fe82cb6a 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 "device-private.h"
diff --git a/src/network/networkd-ipv6ll.c b/src/network/networkd-ipv6ll.c
index 04f51ab530..c4580754f7 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 3c042e6c18..05fe2cb900 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -4,7 +4,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 33e86fb04e..51292871fc 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-setlink.c b/src/network/networkd-setlink.c
index 8519e6e7a0..7aca2bbecc 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 <linux/ipv6.h>
 
diff --git a/src/network/networkd-sysctl.c b/src/network/networkd-sysctl.c
index 10a35bc44b..84c6b68ee4 100644
--- a/src/network/networkd-sysctl.c
+++ b/src/network/networkd-sysctl.c
@@ -2,7 +2,7 @@
 
 #include <netinet/in.h>
 #include <linux/if.h>
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "sd-messages.h"
 
diff --git a/src/shared/netif-util.c b/src/shared/netif-util.c
index 978ce42341..899b5f613f 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 09c04b9a7f..4686897dbf 100644
--- a/src/udev/udev-builtin-net_id.c
+++ b/src/udev/udev-builtin-net_id.c
@@ -19,7 +19,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.34.1

