Switch from memmap to memmap2.

See https://rustsec.org/advisories/RUSTSEC-2020-0077
This commit is contained in:
Dan Gohman
2021-02-16 11:55:27 -08:00
parent d598883f3a
commit b396f6dc6f
5 changed files with 9 additions and 19 deletions

View File

@@ -19,14 +19,14 @@ region = "2.2.0"
libc = { version = "0.2.42" }
errno = "0.2.4"
target-lexicon = "0.11"
memmap = { version = "0.7.0", optional = true }
memmap2 = { version = "0.2.1", optional = true }
log = { version = "0.4.6", default-features = false }
[target.'cfg(target_os = "windows")'.dependencies]
winapi = { version = "0.3", features = ["winbase", "memoryapi"] }
[features]
selinux-fix = ['memmap']
selinux-fix = ['memmap2']
default = []
[dev-dependencies]

View File

@@ -5,7 +5,7 @@ use errno;
use libc;
#[cfg(feature = "selinux-fix")]
use memmap::MmapMut;
use memmap2::MmapMut;
use region;
use std::convert::TryFrom;