| 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 |
| |