aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaibo Huang <hhb@google.com>2021-02-17 19:53:43 -0800
committerHaibo Huang <hhb@google.com>2021-02-17 19:53:43 -0800
commit800e864d68737296cf1258b8e18915dc01e64ef9 (patch)
treea8f8e81c04c599df6a47dc43fc32a4470cc76d55
parent6aea16abde398cf8864b5e570b1d6a689c152bbb (diff)
downloadmio-800e864d68737296cf1258b8e18915dc01e64ef9.tar.gz
Upgrade rust/crates/mio to 0.7.8
Test: make Change-Id: Ifa282eee38e66604bfaafe68e4ba82e3c4b2761c
-rw-r--r--.cargo_vcs_info.json2
-rw-r--r--Android.bp23
-rw-r--r--CHANGELOG.md9
-rw-r--r--Cargo.lock6
-rw-r--r--Cargo.toml4
-rw-r--r--Cargo.toml.orig4
-rw-r--r--METADATA8
-rw-r--r--TEST_MAPPING11
-rw-r--r--src/lib.rs2
-rw-r--r--src/sys/unix/selector/kqueue.rs6
-rw-r--r--src/sys/unix/tcp.rs6
11 files changed, 45 insertions, 36 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index 5454293..f8fb5d1 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,5 +1,5 @@
{
"git": {
- "sha1": "0fef0d61ade20be45eb670eb3786af0e06e59f63"
+ "sha1": "20b7298fe0d3da04b965ec4a379db0247cd632be"
}
}
diff --git a/Android.bp b/Android.bp
index a904b23..e108827 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,22 +1,5 @@
// This file is generated by cargo2android.py --run --device --dependencies --features os-poll,tcp,udp,uds,os-util --patch=patches/Android.bp.patch.
-package {
- default_applicable_licenses: ["external_rust_crates_mio_license"],
-}
-
-// Added automatically by a large-scale-change
-// See: http://go/android-license-faq
-license {
- name: "external_rust_crates_mio_license",
- visibility: [":__subpackages__"],
- license_kinds: [
- "SPDX-license-identifier-MIT",
- ],
- license_text: [
- "LICENSE",
- ],
-}
-
rust_library {
name: "libmio",
host_supported: true,
@@ -44,6 +27,6 @@ rust_library {
}
// dependent_library ["feature_list"]
-// cfg-if-0.1.10
-// libc-0.2.81 "align,default,std"
-// log-0.4.11 "std"
+// cfg-if-1.0.0
+// libc-0.2.86 "align,default,std"
+// log-0.4.14 "std"
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9e5059c..2f23320 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,12 @@
+# 0.7.8
+
+## Fixes
+
+* Fix `TcpStream::set_linger` on macOS
+ (https://github.com/tokio-rs/mio/commit/175773ce02e85977db81224c782c8d140aba8543).
+* Fix compilation on DragonFlyBSD
+ (https://github.com/tokio-rs/mio/commit/b51af46b28871f8dd3233b490ee62237ffed6a26).
+
# 0.7.7
## Added
diff --git a/Cargo.lock b/Cargo.lock
index 6e36e56..0e25467 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -29,9 +29,9 @@ checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba"
[[package]]
name = "libc"
-version = "0.2.81"
+version = "0.2.86"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1482821306169ec4d07f6aca392a4681f66c75c9918aa49641a2595db64053cb"
+checksum = "b7282d924be3275cec7f6756ff4121987bc6481325397dde6ba3e7802b1a8b1c"
[[package]]
name = "log"
@@ -44,7 +44,7 @@ dependencies = [
[[package]]
name = "mio"
-version = "0.7.7"
+version = "0.7.8"
dependencies = [
"env_logger",
"libc",
diff --git a/Cargo.toml b/Cargo.toml
index 1115469..80f9f6e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,7 +13,7 @@
[package]
edition = "2018"
name = "mio"
-version = "0.7.7"
+version = "0.7.8"
authors = ["Carl Lerche <me@carllerche.com>", "Thomas de Zeeuw <thomasdezeeuw@gmail.com>", "Tokio Contributors <team@tokio.rs>"]
include = ["Cargo.toml", "LICENSE", "README.md", "CHANGELOG.md", "src/**/*.rs", "examples/**/*.rs"]
description = "Lightweight non-blocking IO"
@@ -60,7 +60,7 @@ tcp = ["net"]
udp = ["net"]
uds = ["net"]
[target."cfg(unix)".dependencies.libc]
-version = "0.2.69"
+version = "0.2.86"
[target."cfg(windows)".dependencies.miow]
version = "0.3.6"
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index e4158eb..0d4b1d8 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -6,7 +6,7 @@ name = "mio"
# - Update CHANGELOG.md.
# - Update doc URL.
# - Create git tag
-version = "0.7.7"
+version = "0.7.8"
license = "MIT"
authors = [
"Carl Lerche <me@carllerche.com>",
@@ -53,7 +53,7 @@ os-util = ["os-ext"]# Replaced with "os-ext" feature.
log = "0.4.8"
[target.'cfg(unix)'.dependencies]
-libc = "0.2.69"
+libc = "0.2.86"
[target.'cfg(windows)'.dependencies]
miow = "0.3.6"
diff --git a/METADATA b/METADATA
index 94c9d6c..9864d68 100644
--- a/METADATA
+++ b/METADATA
@@ -7,13 +7,13 @@ third_party {
}
url {
type: ARCHIVE
- value: "https://static.crates.io/crates/mio/mio-0.7.7.crate"
+ value: "https://static.crates.io/crates/mio/mio-0.7.8.crate"
}
- version: "0.7.7"
+ version: "0.7.8"
license_type: NOTICE
last_upgrade_date {
year: 2021
- month: 1
- day: 5
+ month: 2
+ day: 17
}
}
diff --git a/TEST_MAPPING b/TEST_MAPPING
new file mode 100644
index 0000000..c1780b5
--- /dev/null
+++ b/TEST_MAPPING
@@ -0,0 +1,11 @@
+// Generated by update_crate_tests.py for tests that depend on this crate.
+{
+ "presubmit": [
+ {
+ "name": "quiche_device_test_src_lib"
+ },
+ {
+ "name": "futures-util_device_test_src_lib"
+ }
+ ]
+}
diff --git a/src/lib.rs b/src/lib.rs
index e815754..fedb789 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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,