naccyde / rpms / systemd

Forked from rpms/systemd a year ago
Clone
ac3a84
From a43bf9f897002744610a9ea5ce7bdc91c3e3dc83 Mon Sep 17 00:00:00 2001
ac3a84
From: Khem Raj <raj.khem@gmail.com>
ac3a84
Date: Tue, 8 Nov 2022 12:21:35 -0800
ac3a84
Subject: [PATCH] networkd-ipv4acd.c: Use net/if.h for getting IFF_LOOPBACK
ac3a84
 definition
ac3a84
ac3a84
This helps in avoiding compiling errors on musl. Definition of
ac3a84
IFF_LOOPBACK is the reason for including linux/if_arp.h, this however
ac3a84
could be obtained from net/if.h glibc header equally and makes it
ac3a84
portable as well.
ac3a84
ac3a84
(cherry picked from commit 239e4a42a69c31e55e58618d800e0d68c68931d3)
ac3a84
ac3a84
Related: #2138081
ac3a84
---
ac3a84
 src/network/networkd-ipv4acd.c | 3 ++-
ac3a84
 1 file changed, 2 insertions(+), 1 deletion(-)
ac3a84
ac3a84
diff --git a/src/network/networkd-ipv4acd.c b/src/network/networkd-ipv4acd.c
ac3a84
index 4127657ebd..877dee00ec 100644
ac3a84
--- a/src/network/networkd-ipv4acd.c
ac3a84
+++ b/src/network/networkd-ipv4acd.c
ac3a84
@@ -1,6 +1,7 @@
ac3a84
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
ac3a84
 
ac3a84
-#include <linux/if_arp.h>
ac3a84
+#include <net/if.h> /* IFF_LOOPBACK */
ac3a84
+#include <net/if_arp.h> /* ARPHRD_ETHER */
ac3a84
 
ac3a84
 #include "sd-dhcp-client.h"
ac3a84
 #include "sd-ipv4acd.h"