mirror of
https://github.com/topjohnwu/ndk-busybox.git
synced 2024-11-27 13:40:22 +00:00
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>
This commit is contained in:
parent
b454f64305
commit
fa9b786d8c
@ -87,6 +87,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
|
||||
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user