summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2019-05-09 02:33:45 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2019-05-09 03:21:31 +0200
commit9aa5d8ba8492a9ed84cf93fc10140206b58ec84d (patch)
treefe0204c21b73e1d3f754da35cd860aedd82a5abf /src/network
parentnetwork: drop arpa/inet.h from networkd-manager.h (diff)
downloadsystemd-9aa5d8ba8492a9ed84cf93fc10140206b58ec84d.tar.xz
systemd-9aa5d8ba8492a9ed84cf93fc10140206b58ec84d.zip
network: include glibc headers before including kernel headers
Diffstat (limited to 'src/network')
-rw-r--r--src/network/netdev/bond.h1
-rw-r--r--src/network/netdev/fou-tunnel.c2
-rw-r--r--src/network/netdev/fou-tunnel.h1
-rw-r--r--src/network/netdev/ipvlan.h1
-rw-r--r--src/network/netdev/l2tp-tunnel.c2
-rw-r--r--src/network/netdev/l2tp-tunnel.h1
-rw-r--r--src/network/netdev/macsec.c2
-rw-r--r--src/network/netdev/macsec.h1
-rw-r--r--src/network/netdev/tunnel.c2
-rw-r--r--src/network/netdev/tuntap.c2
-rw-r--r--src/network/netdev/vcan.h1
-rw-r--r--src/network/netdev/veth.c2
-rw-r--r--src/network/netdev/vlan.c2
-rw-r--r--src/network/netdev/wireguard.h1
-rw-r--r--src/network/networkd-dhcp4.c2
-rw-r--r--src/network/networkd-dhcp6.c2
-rw-r--r--src/network/networkd-ipv4ll.c2
-rw-r--r--src/network/networkd-ipv6-proxy-ndp.c2
-rw-r--r--src/network/networkd-link.c2
-rw-r--r--src/network/networkd-manager.c3
-rw-r--r--src/network/networkd-network.c2
-rw-r--r--src/network/networkd-routing-policy-rule.h1
-rw-r--r--src/network/networkd.c1
23 files changed, 25 insertions, 13 deletions
diff --git a/src/network/netdev/bond.h b/src/network/netdev/bond.h
index 12f59cd946..038272f107 100644
--- a/src/network/netdev/bond.h
+++ b/src/network/netdev/bond.h
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#pragma once
+#include <netinet/in.h>
#include <linux/if_bonding.h>
#include "in-addr-util.h"
diff --git a/src/network/netdev/fou-tunnel.c b/src/network/netdev/fou-tunnel.c
index 2d4481e060..b5d4690f21 100644
--- a/src/network/netdev/fou-tunnel.c
+++ b/src/network/netdev/fou-tunnel.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
-#include <arpa/inet.h>
#include <net/if.h>
+#include <netinet/in.h>
#include <linux/ip.h>
#include "conf-parser.h"
diff --git a/src/network/netdev/fou-tunnel.h b/src/network/netdev/fou-tunnel.h
index 51eeac41bd..a93d2dc02f 100644
--- a/src/network/netdev/fou-tunnel.h
+++ b/src/network/netdev/fou-tunnel.h
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#pragma once
+#include <netinet/in.h>
#include <linux/fou.h>
#include "in-addr-util.h"
diff --git a/src/network/netdev/ipvlan.h b/src/network/netdev/ipvlan.h
index 78f09dbb2d..eb67b5c195 100644
--- a/src/network/netdev/ipvlan.h
+++ b/src/network/netdev/ipvlan.h
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#pragma once
+#include <netinet/in.h>
#include <linux/if_link.h>
#include "netdev/netdev.h"
diff --git a/src/network/netdev/l2tp-tunnel.c b/src/network/netdev/l2tp-tunnel.c
index 2a74d89e5d..6ac23052bb 100644
--- a/src/network/netdev/l2tp-tunnel.c
+++ b/src/network/netdev/l2tp-tunnel.c
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
-#include <arpa/inet.h>
+#include <netinet/in.h>
#include <linux/l2tp.h>
#include <linux/genetlink.h>
diff --git a/src/network/netdev/l2tp-tunnel.h b/src/network/netdev/l2tp-tunnel.h
index a97c924c5d..d314b98703 100644
--- a/src/network/netdev/l2tp-tunnel.h
+++ b/src/network/netdev/l2tp-tunnel.h
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#pragma once
+#include <netinet/in.h>
#include <linux/l2tp.h>
#include "in-addr-util.h"
diff --git a/src/network/netdev/macsec.c b/src/network/netdev/macsec.c
index ccc37cded4..c82a6fd0ac 100644
--- a/src/network/netdev/macsec.c
+++ b/src/network/netdev/macsec.c
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
-#include <arpa/inet.h>
+#include <netinet/in.h>
#include <linux/if_ether.h>
#include <linux/if_macsec.h>
#include <linux/genetlink.h>
diff --git a/src/network/netdev/macsec.h b/src/network/netdev/macsec.h
index 2bd08ac500..2a3443a6d4 100644
--- a/src/network/netdev/macsec.h
+++ b/src/network/netdev/macsec.h
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#pragma once
+#include <netinet/in.h>
#include <linux/if_macsec.h>
#include "in-addr-util.h"
diff --git a/src/network/netdev/tunnel.c b/src/network/netdev/tunnel.c
index 84f6af8578..e69a009c31 100644
--- a/src/network/netdev/tunnel.c
+++ b/src/network/netdev/tunnel.c
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
-#include <arpa/inet.h>
+#include <netinet/in.h>
#include <linux/fou.h>
#include <linux/ip.h>
#include <linux/if_tunnel.h>
diff --git a/src/network/netdev/tuntap.c b/src/network/netdev/tuntap.c
index 951138d257..d08acf0c66 100644
--- a/src/network/netdev/tuntap.c
+++ b/src/network/netdev/tuntap.c
@@ -2,12 +2,12 @@
#include <errno.h>
#include <fcntl.h>
-#include <linux/if_tun.h>
#include <net/if.h>
#include <netinet/if_ether.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/types.h>
+#include <linux/if_tun.h>
#include "alloc-util.h"
#include "fd-util.h"
diff --git a/src/network/netdev/vcan.h b/src/network/netdev/vcan.h
index 6f62686d08..671b5cb639 100644
--- a/src/network/netdev/vcan.h
+++ b/src/network/netdev/vcan.h
@@ -3,6 +3,7 @@
typedef struct VCan VCan;
+#include <netinet/in.h>
#include <linux/can/netlink.h>
#include "netdev/netdev.h"
diff --git a/src/network/netdev/veth.c b/src/network/netdev/veth.c
index 3ad95ade0f..a0a0b8e39e 100644
--- a/src/network/netdev/veth.c
+++ b/src/network/netdev/veth.c
@@ -1,8 +1,8 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include <errno.h>
-#include <linux/veth.h>
#include <net/if.h>
+#include <linux/veth.h>
#include "sd-netlink.h"
diff --git a/src/network/netdev/vlan.c b/src/network/netdev/vlan.c
index dd548b338a..4d939ab045 100644
--- a/src/network/netdev/vlan.c
+++ b/src/network/netdev/vlan.c
@@ -1,8 +1,8 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include <errno.h>
-#include <linux/if_vlan.h>
#include <net/if.h>
+#include <linux/if_vlan.h>
#include "netdev/vlan.h"
#include "vlan-util.h"
diff --git a/src/network/netdev/wireguard.h b/src/network/netdev/wireguard.h
index 862f2a99c4..ce336c985a 100644
--- a/src/network/netdev/wireguard.h
+++ b/src/network/netdev/wireguard.h
@@ -2,6 +2,7 @@
typedef struct Wireguard Wireguard;
+#include <netinet/in.h>
#include <linux/wireguard.h>
#include "in-addr-util.h"
diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c
index 01f4e955c8..eaf7fb0427 100644
--- a/src/network/networkd-dhcp4.c
+++ b/src/network/networkd-dhcp4.c
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
-#include <netinet/ether.h>
+#include <netinet/in.h>
#include <linux/if.h>
#include "alloc-util.h"
diff --git a/src/network/networkd-dhcp6.c b/src/network/networkd-dhcp6.c
index 53e6774252..afa3e2cfd6 100644
--- a/src/network/networkd-dhcp6.c
+++ b/src/network/networkd-dhcp6.c
@@ -3,7 +3,7 @@
Copyright © 2014 Intel Corporation. All rights reserved.
***/
-#include <netinet/ether.h>
+#include <netinet/in.h>
#include <linux/if.h>
#include "sd-radv.h"
diff --git a/src/network/networkd-ipv4ll.c b/src/network/networkd-ipv4ll.c
index 79e90f2f5a..8fb8a64e6d 100644
--- a/src/network/networkd-ipv4ll.c
+++ b/src/network/networkd-ipv4ll.c
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
-#include <netinet/ether.h>
+#include <netinet/in.h>
#include <linux/if.h>
#include "network-internal.h"
diff --git a/src/network/networkd-ipv6-proxy-ndp.c b/src/network/networkd-ipv6-proxy-ndp.c
index e2d77e9ad2..863171b071 100644
--- a/src/network/networkd-ipv6-proxy-ndp.c
+++ b/src/network/networkd-ipv6-proxy-ndp.c
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
-#include <netinet/ether.h>
+#include <netinet/in.h>
#include <linux/if.h>
#include <unistd.h>
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index c175e95584..17657ed17d 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
-#include <netinet/ether.h>
+#include <netinet/in.h>
#include <linux/if.h>
#include <linux/can/netlink.h>
#include <unistd.h>
diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c
index 20acb50ef3..1af25dc812 100644
--- a/src/network/networkd-manager.c
+++ b/src/network/networkd-manager.c
@@ -1,9 +1,10 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
+#include <netinet/in.h>
#include <sys/socket.h>
+#include <unistd.h>
#include <linux/if.h>
#include <linux/fib_rules.h>
-#include <unistd.h>
#include "sd-daemon.h"
#include "sd-netlink.h"
diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
index dc1da8376b..e67fbe4219 100644
--- a/src/network/networkd-network.c
+++ b/src/network/networkd-network.c
@@ -1,5 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
+#include <net/if.h>
+#include <netinet/in.h>
#include <linux/netdevice.h>
#include "alloc-util.h"
diff --git a/src/network/networkd-routing-policy-rule.h b/src/network/networkd-routing-policy-rule.h
index 28699ba236..4ee0b5489e 100644
--- a/src/network/networkd-routing-policy-rule.h
+++ b/src/network/networkd-routing-policy-rule.h
@@ -2,6 +2,7 @@
#pragma once
#include <inttypes.h>
+#include <netinet/in.h>
#include <linux/fib_rules.h>
#include <stdbool.h>
diff --git a/src/network/networkd.c b/src/network/networkd.c
index 4b04aa0463..090f3777a5 100644
--- a/src/network/networkd.c
+++ b/src/network/networkd.c
@@ -1,5 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
+#include <netinet/in.h>
#include <sys/stat.h>
#include <sys/types.h>