From fa9b786d8c34bcaf61a3dfdd20138c6172e02755 Mon Sep 17 00:00:00 2001 From: Chris Renshaw 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 , 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 --- networking/ether-wake.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/networking/ether-wake.c b/networking/ether-wake.c index 809c0d9f0..920f0c4a0 100644 --- a/networking/ether-wake.c +++ b/networking/ether-wake.c @@ -87,6 +87,7 @@ #include "libbb.h" #include #include +#include #include /* Note: PF_INET, SOCK_DGRAM, IPPROTO_UDP would allow SIOCGIFHWADDR to @@ -132,7 +133,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