From 338edb28635cd3d439b0843d68fc867f1b0c8e3a Mon Sep 17 00:00:00 2001 From: Tuetuopay Date: Thu, 8 Feb 2024 18:41:39 +0100 Subject: [PATCH] socket: enable send/recvmmsg variants on unix only From a quick glance, Windows does not have the equivalent syscall in the WinSock API. --- src/socket.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/socket.rs b/src/socket.rs index 165a2df3..49ef920b 100644 --- a/src/socket.rs +++ b/src/socket.rs @@ -587,8 +587,8 @@ impl Socket { } /// Receive multiple messages in a single call. - #[cfg(not(target_os = "redox"))] - #[cfg_attr(docsrs, doc(cfg(not(target_os = "redox"))))] + #[cfg(all(unix, not(target_os = "redox")))] + #[cfg_attr(docsrs, doc(cfg(all(unix, not(target_os = "redox")))))] pub fn recv_multiple_from( &self, msgs: &mut [MaybeUninitSlice<'_>], @@ -766,8 +766,8 @@ impl Socket { /// Send multiple data to multiple peers listening on `addrs`. Return the amount of bytes /// written for each message. - #[cfg(not(target_os = "redox"))] - #[cfg_attr(docsrs, doc(cfg(not(target_os = "redox"))))] + #[cfg(all(unix, not(target_os = "redox")))] + #[cfg_attr(docsrs, doc(cfg(all(unix, not(target_os = "redox")))))] pub fn send_multiple_to( &self, msgs: &[IoSlice<'_>],