Skip to content

Commit 213bd20

Browse files
crytaljinmeta-codesync[bot]
authored andcommitted
Fix LibevQuicAsyncUDPSocket build on macOS (recvmmsg)
Summary: `recvmmsg` is a Linux-only syscall and is absent from Darwin's libc. `LibevQuicAsyncUDPSocket::recvmmsg` guarded the direct `::recvmmsg` call with only `#if !FOLLY_MOBILE`, but macOS desktop is not `FOLLY_MOBILE`, so the branch was compiled on Mac builds. With no global `::recvmmsg`, the identifier resolved to the class's own member function, producing `no member named 'recvmmsg' in the global namespace` and blocking any macOS app that links MNS/mvfst's libev QUIC (HTTP/3) path (e.g. the Remote Desktop Mac companion). Exclude `__APPLE__` from the guard so macOS falls through to the existing `recvmsg` loop fallback, matching how folly's own `netops::recvmmsg` degrades on platforms lacking the syscall. Reviewed By: kvtsoy Differential Revision: D112124811 fbshipit-source-id: ba7805cd42a49d992b7589e0f05b6947d8157119
1 parent 96ac25f commit 213bd20

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

quic/common/udpsocket/LibevQuicAsyncUDPSocket.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,9 @@ int LibevQuicAsyncUDPSocket::recvmmsg(
682682
unsigned int vlen,
683683
unsigned int flags,
684684
struct timespec* timeout) {
685-
#if !FOLLY_MOBILE
685+
// recvmmsg is a Linux-only syscall; it is absent from Darwin's libc, so on
686+
// macOS (which is not FOLLY_MOBILE) fall through to the recvmsg loop below.
687+
#if !FOLLY_MOBILE && !defined(__APPLE__)
686688
if (reinterpret_cast<void*>(::recvmmsg) != nullptr) {
687689
return ::recvmmsg(fd_, msgvec, vlen, (int)flags, timeout);
688690
}

0 commit comments

Comments
 (0)