From d375736a39dfc1c90393a5336b7d3b3070122fc7 Mon Sep 17 00:00:00 2001 From: Srivats P Date: Thu, 27 Apr 2023 12:50:22 +0530 Subject: [PATCH] Don't use udiffTimeStamp() with struct timeval It will fail to build for non-Linux platforms where TimeStamp is NOT timeval --- server/pcaptxthread.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/server/pcaptxthread.cpp b/server/pcaptxthread.cpp index 37c7e33..91fa6f7 100644 --- a/server/pcaptxthread.cpp +++ b/server/pcaptxthread.cpp @@ -159,16 +159,12 @@ bool PcapTxThread::appendToPacketList(long sec, long nsec, // If not enough space, update usecDelay and alloc a new seq if (!currentPacketSequence_->hasFreeSpace(2*sizeof(pcap_pkthdr)+length)) { -#if 0 // FIXME: temporary MacOS build fix - currentPacketSequence_->usecDelay_ = udiffTimeStamp( - ¤tPacketSequence_->lastPacket_->ts, &pktHdr.ts); -#else struct timeval diff; timersub(&pktHdr.ts, ¤tPacketSequence_->lastPacket_->ts, &diff); currentPacketSequence_->usecDelay_ = diff.tv_usec; if (diff.tv_sec) currentPacketSequence_->usecDelay_ += diff.tv_sec*1e6; -#endif + //! \todo (LOW): calculate sendqueue size currentPacketSequence_ = new PacketSequence(trackStreamStats_); packetSequenceList_.append(currentPacketSequence_);