diff --git a/Cargo.toml b/Cargo.toml index 083f8873..821038eb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,9 +23,7 @@ libc = "0.2" matches = "0.1.6" region = "0.0.7" slice-pool = "0.3.4" - -[dependencies.mmap] -git = "https://github.com/retep998/rust-mmap.git" +mmap-fixed = "0.1.2" [dev-dependencies] volatile_cell = "1.0.0" diff --git a/src/alloc/proximity.rs b/src/alloc/proximity.rs index 73f645a4..57751978 100644 --- a/src/alloc/proximity.rs +++ b/src/alloc/proximity.rs @@ -3,7 +3,7 @@ use std::ops::Range; use slice_pool::{SlicePool, PoolVal}; use boolinator::Boolinator; -use mmap; +use mmap_fixed as mmap; use error::*; use super::search as region_search; diff --git a/src/error.rs b/src/error.rs index 751d5505..a03e024e 100644 --- a/src/error.rs +++ b/src/error.rs @@ -1,6 +1,6 @@ //! Error types and utilities. +use mmap_fixed as mmap; use region; -use mmap; error_chain! { foreign_links { diff --git a/src/lib.rs b/src/lib.rs index f5320da7..cb5eb187 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -96,7 +96,7 @@ #[macro_use] extern crate matches; extern crate boolinator; extern crate generic_array; -extern crate mmap; +extern crate mmap_fixed; extern crate region; extern crate slice_pool; diff --git a/tests/lib.rs b/tests/lib.rs index 43301f1f..95d3f5f3 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -74,7 +74,7 @@ fn generic() { } #[cfg(feature = "static")] -mod static_test { +mod statik { use super::*; #[inline(never)] @@ -87,7 +87,7 @@ mod static_test { } #[test] - fn static_hook() { + fn test() { unsafe { let mut hook = DetourAdd.initialize(add, |x, y| x - y).unwrap();