Browse Source

Added ifdefs surrounding usage of getifaddrs() on Android

Joseph Henry 7 years ago
parent
commit
62a93c58fd
1 changed files with 2 additions and 1 deletions
  1. 2 1
      osdep/Binder.hpp

+ 2 - 1
osdep/Binder.hpp

@@ -293,7 +293,7 @@ public:
 #else
 			const bool gotViaProc = false;
 #endif
-
+#if !defined(ZT_SDK) || !defined(__ANDROID__) // getifaddrs() freeifaddrs() not available on Android
 			if (!gotViaProc) {
 				struct ifaddrs *ifatbl = (struct ifaddrs *)0;
 				struct ifaddrs *ifa;
@@ -325,6 +325,7 @@ public:
 					interfacesEnumerated = false;
 				}
 			}
+#endif
 
 #endif
 		} else {