aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-core/ell/ell/0001-dhcp-include-if_arp.h-from-libc-instead-of-linux-hea.patch
blob: ada65401a3f698f8d5fccc2d1fd806d605c2770c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
From d8236d1d789f496a193dae5d2a15d706b81f6482 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Hundeb=C3=B8ll?= <martin@geanix.com>
Date: Thu, 12 Jul 2018 10:19:50 +0200
Subject: [PATCH] dhcp: include if_arp.h from libc instead of linux headers
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
To: ell@lists.01.org

Compilation with musl libc fails due to redefinition of 'struct
arp{req,req_old,hdr}' in linux/if_arp.h, since it is already defined and
included in net/if_arp.h (through net/ethernet.h -> net/if_ether.h).

The only symbols used from if_arp.h is ARPHRD_ETHER, so it should be
safe to avoid the compile error by including the if_arp.h header from
the c-library instead.

Upstream-Status: Backport [https://lists.01.org/pipermail/ell/2018-July/001244.html]
Signed-off-by: Martin Hundebøll <martin@geanix.com>
---
 ell/dhcp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ell/dhcp.c b/ell/dhcp.c
index 6c90370..0d99f74 100644
--- a/ell/dhcp.c
+++ b/ell/dhcp.c
@@ -27,7 +27,7 @@
 #include <netinet/ip.h>
 #include <net/ethernet.h>
 #include <linux/types.h>
-#include <linux/if_arp.h>
+#include <net/if_arp.h>
 #include <errno.h>
 #include <time.h>
 
-- 
2.18.0