From: Chris Renshaw <osm0sis@outlook.com>
Date: Wed, 2 Dec 2015 23:44:06 -0400
Subject: [PATCH] fix ether-wake, avoid ether_hostton and include if_ether

Patch by Tias Guns <tias@ulyssis.org>, based on 'no-ether_hostton' by Dan Drown
"there is no /etc/ethers or ether_hostton on bionic"
http://dan.drown.org/android/src/busybox/
Rebased for busybox 1.24.1 by Chris Renshaw <osm0sis@outlook.com>
---
 networking/ether-wake.c | 3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/networking/ether-wake.c b/networking/ether-wake.c
index 103a421..ee33dc5 100644
--- a/networking/ether-wake.c
+++ b/networking/ether-wake.c
@@ -77,6 +77,7 @@
 #include "libbb.h"
 #include <netpacket/packet.h>
 #include <netinet/ether.h>
+#include <netinet/if_ether.h>
 #include <linux/if.h>
 
 /* Note: PF_INET, SOCK_DGRAM, IPPROTO_UDP would allow SIOCGIFHWADDR to
@@ -122,7 +123,7 @@ static void get_dest_addr(const char *hostid, struct ether_addr *eaddr)
 	eap = ether_aton_r(hostid, eaddr);
 	if (eap) {
 		bb_debug_msg("The target station address is %s\n\n", ether_ntoa_r(eap, ether_buf));
-#if !defined(__UCLIBC__) || UCLIBC_VERSION >= KERNEL_VERSION(0, 9, 30)
+#if !defined(__BIONIC__) && (!defined(__UCLIBC__) || UCLIBC_VERSION >= KERNEL_VERSION(0, 9, 30))
 	} else if (ether_hostton(hostid, eaddr) == 0) {
 		bb_debug_msg("Station address for hostname %s is %s\n\n", hostid, ether_ntoa_r(eaddr, ether_buf));
 #endif
-- 
2.5.3

