summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-ipv4acd.c
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2022-11-08 21:21:35 +0100
committerLuca Boccassi <luca.boccassi@gmail.com>2022-11-09 01:17:37 +0100
commit239e4a42a69c31e55e58618d800e0d68c68931d3 (patch)
tree68dab27a7c10af8ea4716b74a63ee96641d3aa4a /src/network/networkd-ipv4acd.c
parentMerge pull request #25297 from mrc0mmand/aux-test-fixes (diff)
downloadsystemd-239e4a42a69c31e55e58618d800e0d68c68931d3.tar.xz
systemd-239e4a42a69c31e55e58618d800e0d68c68931d3.zip
networkd-ipv4acd.c: Use net/if.h for getting IFF_LOOPBACK definition
This helps in avoiding compiling errors on musl. Definition of IFF_LOOPBACK is the reason for including linux/if_arp.h, this however could be obtained from net/if.h glibc header equally and makes it portable as well.
Diffstat (limited to 'src/network/networkd-ipv4acd.c')
-rw-r--r--src/network/networkd-ipv4acd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network/networkd-ipv4acd.c b/src/network/networkd-ipv4acd.c
index 4127657ebd..877dee00ec 100644
--- a/src/network/networkd-ipv4acd.c
+++ b/src/network/networkd-ipv4acd.c
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
-#include <linux/if_arp.h>
+#include <net/if.h> /* IFF_LOOPBACK */
+#include <net/if_arp.h> /* ARPHRD_ETHER */
#include "sd-dhcp-client.h"
#include "sd-ipv4acd.h"