diff --git a/Net/include/Poco/Net/ICMPv4PacketImpl.h b/Net/include/Poco/Net/ICMPv4PacketImpl.h index dc6db4923..d30a076bb 100644 --- a/Net/include/Poco/Net/ICMPv4PacketImpl.h +++ b/Net/include/Poco/Net/ICMPv4PacketImpl.h @@ -69,10 +69,12 @@ public: }; // compile-time shield against misalignment +#ifndef POCO_ANDROID poco_static_assert (offsetof(Header, code) == 0x01); poco_static_assert (offsetof(Header, checksum) == 0x02); poco_static_assert (offsetof(Header, id) == 0x04); poco_static_assert (offsetof(Header, seq) == 0x06); +#endif enum MessageType { diff --git a/Net/include/Poco/Net/SocketDefs.h b/Net/include/Poco/Net/SocketDefs.h index dcb49eef7..efb212dba 100644 --- a/Net/include/Poco/Net/SocketDefs.h +++ b/Net/include/Poco/Net/SocketDefs.h @@ -39,6 +39,16 @@ #ifndef Net_SocketDefs_INCLUDED #define Net_SocketDefs_INCLUDED +#ifndef __THROW +# ifndef __GNUC_PREREQ +# define __GNUC_PREREQ(maj, min) (0) +# endif +# if defined __cplusplus && __GNUC_PREREQ (2,8) +# define __THROW throw () +# else +# define __THROW +# endif +#endif #if defined(POCO_OS_FAMILY_WINDOWS) #include "Poco/UnWindows.h" diff --git a/Net/src/NetworkInterface.cpp b/Net/src/NetworkInterface.cpp index df4f95cd2..6a18dccd3 100644 --- a/Net/src/NetworkInterface.cpp +++ b/Net/src/NetworkInterface.cpp @@ -1276,7 +1276,9 @@ NetworkInterface::Map NetworkInterface::map(bool ipOnly, bool upOnly) #include +#ifndef POCO_ANDROID // Android doesn't have #include +#endif #include #include #include @@ -1306,6 +1308,8 @@ static NetworkInterface::Type fromNative(unsigned arphrd) } } +#ifndef POCO_ANDROID + void setInterfaceParams(struct ifaddrs* iface, NetworkInterfaceImpl& impl) { struct sockaddr_ll* sdl = (struct sockaddr_ll*) iface->ifa_addr; @@ -1317,11 +1321,14 @@ void setInterfaceParams(struct ifaddrs* iface, NetworkInterfaceImpl& impl) impl.setType(fromNative(sdl->sll_hatype)); } +#endif + } NetworkInterface::Map NetworkInterface::map(bool ipOnly, bool upOnly) { +#ifndef POCO_ANDROID FastMutex::ScopedLock lock(_mutex); Map result; unsigned ifIndex = 0; @@ -1420,6 +1427,9 @@ NetworkInterface::Map NetworkInterface::map(bool ipOnly, bool upOnly) if (ifaces) freeifaddrs(ifaces); return result; +#else + throw Poco::NotImplementedException("Not implemented in Android"); +#endif }