mirror of
https://github.com/mfontanini/libtins
synced 2026-01-29 04:54:28 +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->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);
|
info->netmask = IPv4Address(((struct sockaddr_in *)addr->ifa_netmask)->sin_addr.s_addr);
|
||||||
if((addr->ifa_flags & (IFF_BROADCAST | IFF_POINTOPOINT)))
|
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
|
else
|
||||||
info->bcast_addr = 0;
|
info->bcast_addr = 0;
|
||||||
info->is_up = (addr->ifa_flags & IFF_UP);
|
info->is_up = (addr->ifa_flags & IFF_UP);
|
||||||
|
|||||||
@@ -42,6 +42,7 @@
|
|||||||
#include <net/if_dl.h>
|
#include <net/if_dl.h>
|
||||||
#else
|
#else
|
||||||
#include <netpacket/packet.h>
|
#include <netpacket/packet.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
#endif
|
#endif
|
||||||
#include <net/ethernet.h>
|
#include <net/ethernet.h>
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -43,6 +43,10 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
|
#ifdef __ANDROID_API__
|
||||||
|
#include <linux/in.h>
|
||||||
|
#include <linux/in6.h>
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#include <ws2tcpip.h>
|
#include <ws2tcpip.h>
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user