mirror of
https://github.com/mfontanini/libtins
synced 2026-01-23 02:35:57 +01:00
Fix compilation errors on android.
This commit is contained in:
@@ -98,7 +98,7 @@ struct InterfaceInfoCollector {
|
||||
info->ip_addr = IPv4Address(((struct sockaddr_in *)addr->ifa_addr)->sin_addr.s_addr);
|
||||
info->netmask = IPv4Address(((struct sockaddr_in *)addr->ifa_netmask)->sin_addr.s_addr);
|
||||
if((addr->ifa_flags & (IFF_BROADCAST | IFF_POINTOPOINT)))
|
||||
info->bcast_addr = IPv4Address(((struct sockaddr_in *)addr->ifa_ifu.ifu_broadaddr)->sin_addr.s_addr);
|
||||
info->bcast_addr = IPv4Address(((struct sockaddr_in *)addr->ifa_broadaddr)->sin_addr.s_addr);
|
||||
else
|
||||
info->bcast_addr = 0;
|
||||
info->is_up = (addr->ifa_flags & IFF_UP);
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include <net/if_dl.h>
|
||||
#else
|
||||
#include <netpacket/packet.h>
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#include <net/ethernet.h>
|
||||
#endif
|
||||
|
||||
@@ -43,6 +43,10 @@
|
||||
#endif
|
||||
#include <netdb.h>
|
||||
#include <net/if.h>
|
||||
#ifdef __ANDROID_API__
|
||||
#include <linux/in.h>
|
||||
#include <linux/in6.h>
|
||||
#endif
|
||||
#else
|
||||
#include <ws2tcpip.h>
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user