Commit c40a144b authored by jan.koester's avatar jan.koester
Browse files

udp: define releaseThreadScratch() on non-mmsg platforms

ThreadPool::workerLoop() calls it unconditionally, but the only POSIX
definition lived inside the recvmmsg-only block, breaking the link on
FreeBSD and other non-Linux systems.

Co-Authored-By: default avatarClaude Opus 5.5 <noreply@anthropic.com>
parent 71fb59b6
Loading
Loading
Loading
Loading
+7 −0
Changes for src/posix/udp.cpp: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -706,6 +706,13 @@ uint16_t recvBatchGroSegSize(int i, bool gro_enabled) {
} // namespace
#endif // NETPLUS_NO_MMSG

#ifdef NETPLUS_NO_MMSG
// No 4MB flat recvmmsg buffer on this path (the recvfrom fallbacks use small
// per-function thread_local buffers), so there is nothing worth releasing.
// Still has to exist: ThreadPool::workerLoop() calls it unconditionally.
void releaseThreadScratch() {}
#endif

size_t udp::recvBatchAddr(std::vector<std::vector<uint8_t>>& out,
                           std::vector<sockaddr_storage>& addrs,
                           int max_count) {