diff options
author | Haibo Huang <hhb@google.com> | 2021-02-17 19:53:43 -0800 |
---|---|---|
committer | Haibo Huang <hhb@google.com> | 2021-02-17 19:53:43 -0800 |
commit | 800e864d68737296cf1258b8e18915dc01e64ef9 (patch) | |
tree | a8f8e81c04c599df6a47dc43fc32a4470cc76d55 /src | |
parent | 6aea16abde398cf8864b5e570b1d6a689c152bbb (diff) | |
download | mio-800e864d68737296cf1258b8e18915dc01e64ef9.tar.gz |
Upgrade rust/crates/mio to 0.7.8
Test: make
Change-Id: Ifa282eee38e66604bfaafe68e4ba82e3c4b2761c
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 2 | ||||
-rw-r--r-- | src/sys/unix/selector/kqueue.rs | 6 | ||||
-rw-r--r-- | src/sys/unix/tcp.rs | 6 |
3 files changed, 10 insertions, 4 deletions
@@ -1,4 +1,4 @@ -#![doc(html_root_url = "https://docs.rs/mio/0.7.7")] +#![doc(html_root_url = "https://docs.rs/mio/0.7.8")] #![deny( missing_docs, missing_debug_implementations, diff --git a/src/sys/unix/selector/kqueue.rs b/src/sys/unix/selector/kqueue.rs index f509f92..34f5340 100644 --- a/src/sys/unix/selector/kqueue.rs +++ b/src/sys/unix/selector/kqueue.rs @@ -19,7 +19,7 @@ type Count = libc::c_int; type Count = libc::size_t; // Type of the `filter` field in the `kevent` structure. -#[cfg(any(target_os = "freebsd", target_os = "openbsd"))] +#[cfg(any(target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd"))] type Filter = libc::c_short; #[cfg(any(target_os = "macos", target_os = "ios"))] type Filter = i16; @@ -27,7 +27,7 @@ type Filter = i16; type Filter = u32; // Type of the `flags` field in the `kevent` structure. -#[cfg(any(target_os = "freebsd", target_os = "openbsd"))] +#[cfg(any(target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd"))] type Flags = libc::c_ushort; #[cfg(any(target_os = "macos", target_os = "ios"))] type Flags = u16; @@ -651,7 +651,7 @@ pub mod event { libc::NOTE_LEEWAY, #[cfg(any(target_os = "ios", target_os = "macos"))] libc::NOTE_CRITICAL, - #[cfg(any(target_os = "dragonfly"))] + #[cfg(any(target_os = "ios", target_os = "macos"))] libc::NOTE_BACKGROUND, ); diff --git a/src/sys/unix/tcp.rs b/src/sys/unix/tcp.rs index 9e1d700..70986fa 100644 --- a/src/sys/unix/tcp.rs +++ b/src/sys/unix/tcp.rs @@ -140,6 +140,9 @@ pub(crate) fn set_linger(socket: TcpSocket, dur: Option<Duration>) -> io::Result syscall!(setsockopt( socket, libc::SOL_SOCKET, + #[cfg(target_vendor = "apple")] + libc::SO_LINGER_SEC, + #[cfg(not(target_vendor = "apple"))] libc::SO_LINGER, &val as *const libc::linger as *const libc::c_void, size_of::<libc::linger>() as libc::socklen_t, @@ -154,6 +157,9 @@ pub(crate) fn get_linger(socket: TcpSocket) -> io::Result<Option<Duration>> { syscall!(getsockopt( socket, libc::SOL_SOCKET, + #[cfg(target_vendor = "apple")] + libc::SO_LINGER_SEC, + #[cfg(not(target_vendor = "apple"))] libc::SO_LINGER, &mut val as *mut _ as *mut _, &mut len, |