blob: ada65401a3f698f8d5fccc2d1fd806d605c2770c [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001From d8236d1d789f496a193dae5d2a15d706b81f6482 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Martin=20Hundeb=C3=B8ll?= <martin@geanix.com>
3Date: Thu, 12 Jul 2018 10:19:50 +0200
4Subject: [PATCH] dhcp: include if_arp.h from libc instead of linux headers
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8To: ell@lists.01.org
9
10Compilation with musl libc fails due to redefinition of 'struct
11arp{req,req_old,hdr}' in linux/if_arp.h, since it is already defined and
12included in net/if_arp.h (through net/ethernet.h -> net/if_ether.h).
13
14The only symbols used from if_arp.h is ARPHRD_ETHER, so it should be
15safe to avoid the compile error by including the if_arp.h header from
16the c-library instead.
17
18Upstream-Status: Backport [https://lists.01.org/pipermail/ell/2018-July/001244.html]
19Signed-off-by: Martin HundebΓΈll <martin@geanix.com>
20---
21 ell/dhcp.c | 2 +-
22 1 file changed, 1 insertion(+), 1 deletion(-)
23
24diff --git a/ell/dhcp.c b/ell/dhcp.c
25index 6c90370..0d99f74 100644
26--- a/ell/dhcp.c
27+++ b/ell/dhcp.c
28@@ -27,7 +27,7 @@
29 #include <netinet/ip.h>
30 #include <net/ethernet.h>
31 #include <linux/types.h>
32-#include <linux/if_arp.h>
33+#include <net/if_arp.h>
34 #include <errno.h>
35 #include <time.h>
36
37--
382.18.0
39