facebook / wangle

Wangle is a framework providing a set of common client/server abstractions for building services in a consistent, modular, and composable way.
Apache License 2.0
3.04k stars 535 forks source link

error: no member named 'tcpi_retransmits' in 'tcp_info'; did you mean '__tcpi_retransmits'? #178

Closed yurivict closed 3 years ago

yurivict commented 4 years ago
/usr/ports/net/wangle/work/wangle-2020.05.25.00/wangle/acceptor/TransportInfo.cpp:49:20: error: no member named 'tcpi_retransmits' in 'tcp_info'; did you mean '__tcpi_retransmits'?
  rtx_tm = tcpinfo.tcpi_retransmits;
                   ^~~~~~~~~~~~~~~~
                   __tcpi_retransmits
/usr/include/netinet/tcp.h:272:11: note: '__tcpi_retransmits' declared here
        u_int8_t        __tcpi_retransmits;
                        ^
1 error generated.

OS: FreeBSD 12.1 Version: 2020.05.25.00 clang-9

yurivict commented 4 years ago

Also:

/usr/ports/net/wangle/work/wangle-2020.05.25.00/wangle/acceptor/TransportInfo.cpp:36:30: error: no member named 'tcpi_srtt' in 'tcp_info'; did you mean 'tcpi_rtt'?
  rtt = microseconds(tcpinfo.tcpi_srtt * 1000);
                             ^~~~~~~~~
                             tcpi_rtt
/usr/include/netinet/tcp.h:299:12: note: 'tcpi_rtt' declared here
        u_int32_t       tcpi_rtt;               /* Smoothed RTT in usecs. */
                        ^
/usr/ports/net/wangle/work/wangle-2020.05.25.00/wangle/acceptor/TransportInfo.cpp:40:17: error: no member named 'tcpi_maxseg' in 'tcp_info'
  mss = tcpinfo.tcpi_maxseg;
        ~~~~~~~ ^
chadaustin commented 2 years ago

I'll put up a patch for this soon, but you can just tweak the ifdefs and add one to use __tcpi_retransmits instead.

chadaustin commented 2 years ago

Fixed in https://github.com/facebook/wangle/commit/8cc00432b670fb0f585ad98f8e9bc78c24100e91