dhcp: include if_arp.h from libc instead of linux headers
PATCH v2 1/1 dhcp: include if_arp.h from libc instead of linux headers
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.
---
Changes in v2:
- Rebased on master
- Removed signed-of-by
ell/dhcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
ell/dhcp.c +1 -1
@@ -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>
Signature · 1 line
2.18.0
Denis Kenzior
AppliedHi Martin,
Quoted 8 lines · Martin Hundebøll
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 innet/if_arp.h(throughnet/ethernet.h->net/if_ether.h).The only symbols used from
if_arp.hisARPHRD_ETHER, so it should be safe to avoid the compile error by including theif_arp.hheader from the c-library instead.
Applied, thanks.
Regards,
-Denis