浏览代码

fix ifdef

wasn't running IPv6 temporary address detection for binding
Grant Limberg 3 年之前
父节点
当前提交
8f4c038e23
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      osdep/Binder.hpp

+ 1 - 1
osdep/Binder.hpp

@@ -320,7 +320,7 @@ class Binder {
 					while (ifa) {
 					while (ifa) {
 						if ((ifa->ifa_name) && (ifa->ifa_addr)) {
 						if ((ifa->ifa_name) && (ifa->ifa_addr)) {
 							InetAddress ip = *(ifa->ifa_addr);
 							InetAddress ip = *(ifa->ifa_addr);
-#if defined(__unix__) && !defined(__LINUX__)
+#if (defined(__unix__) || defined(__APPLE__)) && !defined(__LINUX__)
 							// Check if the address is an IPv6 Temporary Address, macOS/BSD version
 							// Check if the address is an IPv6 Temporary Address, macOS/BSD version
 							if (ifa->ifa_addr->sa_family == AF_INET6) {
 							if (ifa->ifa_addr->sa_family == AF_INET6) {
 								struct sockaddr_in6* sa6 = (struct sockaddr_in6*)ifa->ifa_addr;
 								struct sockaddr_in6* sa6 = (struct sockaddr_in6*)ifa->ifa_addr;