mirror of
https://github.com/n0-computer/noq.git
synced 2026-10-03 12:40:46 +00:00
udp: avoid warning about unused set_sendmsg_einval() method
This commit is contained in:
@@ -6,10 +6,12 @@
|
||||
use std::os::unix::io::AsRawFd;
|
||||
#[cfg(windows)]
|
||||
use std::os::windows::io::AsRawSocket;
|
||||
#[cfg(not(windows))]
|
||||
use std::sync::atomic::AtomicBool;
|
||||
use std::{
|
||||
net::{IpAddr, Ipv6Addr, SocketAddr},
|
||||
sync::{
|
||||
atomic::{AtomicBool, AtomicUsize, Ordering},
|
||||
atomic::{AtomicUsize, Ordering},
|
||||
Mutex,
|
||||
},
|
||||
time::{Duration, Instant},
|
||||
@@ -85,7 +87,7 @@ impl UdpState {
|
||||
|
||||
/// Sets the flag indicating we got EINVAL error from `sendmsg` or `sendmmsg` syscall.
|
||||
#[inline]
|
||||
#[cfg(not(windows))]
|
||||
#[cfg(all(unix, not(any(target_os = "macos", target_os = "ios"))))]
|
||||
fn set_sendmsg_einval(&self) {
|
||||
self.sendmsg_einval.store(true, Ordering::Relaxed)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user