浏览代码

Added ifdefs surrounding usage of getifaddrs() on Android

Joseph Henry 7 年之前
父节点
当前提交
62a93c58fd
共有 1 个文件被更改,包括 2 次插入1 次删除
  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 {