Skip to content

Commit

Permalink
fix compilation under FreeBSD
Browse files Browse the repository at this point in the history
Summary:
tcpi_retransmits has two underscores in front on FreeBSD. Maybe it's
deprecated?

Reviewed By: yfeldblum

Differential Revision: D33932259

fbshipit-source-id: 3ddf5fb39b43600e66796759cc59d72628a52694
  • Loading branch information
chadaustin authored and facebook-github-bot committed Feb 2, 2022
1 parent d4334c8 commit 8cc0043
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions wangle/acceptor/TransportInfo.cpp
Expand Up @@ -46,7 +46,11 @@ bool TransportInfo::initWithSocket(const folly::AsyncSocket* sock) {
rtt = microseconds(tcpinfo.tcpi_rtt);
rtt_var = tcpinfo.tcpi_rttvar;
rto = tcpinfo.tcpi_rto;
#ifdef __FreeBSD__
rtx_tm = tcpinfo.__tcpi_retransmits;
#else
rtx_tm = tcpinfo.tcpi_retransmits;
#endif
mss = tcpinfo.tcpi_snd_mss;
cwnd = tcpinfo.tcpi_snd_cwnd;
cwndBytes = cwnd * mss;
Expand Down

0 comments on commit 8cc0043

Please sign in to comment.