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