summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Network/UnixNetworkEnvironment.cpp')
-rw-r--r--Swiften/Network/UnixNetworkEnvironment.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/Swiften/Network/UnixNetworkEnvironment.cpp b/Swiften/Network/UnixNetworkEnvironment.cpp
index 5740a65..e1fdc88 100644
--- a/Swiften/Network/UnixNetworkEnvironment.cpp
+++ b/Swiften/Network/UnixNetworkEnvironment.cpp
@@ -15,5 +15,8 @@
#include <arpa/inet.h>
#include <net/if.h>
+
+#ifndef __ANDROID__
#include <ifaddrs.h>
+#endif
#include <Swiften/Base/boost_bsignals.h>
@@ -25,5 +28,5 @@ namespace Swift {
std::vector<NetworkInterface> UnixNetworkEnvironment::getNetworkInterfaces() const {
std::map<std::string, NetworkInterface> interfaces;
-
+#ifndef __ANDROID__
ifaddrs* addrs = 0;
int ret = getifaddrs(&addrs);
@@ -50,5 +53,5 @@ std::vector<NetworkInterface> UnixNetworkEnvironment::getNetworkInterfaces() con
freeifaddrs(addrs);
-
+#endif
std::vector<NetworkInterface> result;
for (std::map<std::string,NetworkInterface>::const_iterator i = interfaces.begin(); i != interfaces.end(); ++i) {