[MacPorts] #65666: Need TCP_CONNECTION_INFO for <10.11
MacPorts
noreply at macports.org
Mon Aug 15 19:14:50 UTC 2022
#65666: Need TCP_CONNECTION_INFO for <10.11
----------------------------+----------------------
Reporter: barracuda156 | Owner: catap
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.7.2
Resolution: | Keywords:
Port: folly, wangle |
----------------------------+----------------------
Comment (by barracuda156):
Replying to [comment:4 kencu]:
> looking at the commits that brought this into folly last year, they
appear to already expect this info to be unavailable for some linux
versions, and they work around that by examing the size of the returned
struct. Then they only use the info if it is available, I believe.
>
>
https://github.com/facebook/folly/commit/68a78d99d10743b54d38a550b2f0ebdc5c872f76
>
> For Macos, they only support versions where the info is available, so
don’t do such checks.
>
> So a motivated person might look at how they manage the workaround in
linux, and then try to implement something similar for older Macos
versions.
Thank you!
For now, this worked:
{{{
--- folly/net/TcpInfoTypes.h.orig 2022-08-06 08:35:42.000000000
+0700
+++ folly/net/TcpInfoTypes.h 2022-08-14 19:19:26.000000000 +0700
@@ -179,7 +179,7 @@
__u32 tcpi_total_retrans;
};
-#elif defined(__APPLE__)
+#elif defined(__APPLE__) && MAC_OS_X_VERSION_MIN_REQUIRED > 101003
#define FOLLY_HAVE_TCP_INFO 1
using tcp_info = ::tcp_connection_info;
const int tcp_info_sock_opt = TCP_CONNECTION_INFO;
}}}
https://github.com/macports/macports-ports/pull/15689/files
--
Ticket URL: <https://trac.macports.org/ticket/65666#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list