From dfcffe874ed419456a3dae02dbb40ad1b41f1009 Mon Sep 17 00:00:00 2001 From: Patrick Mooney Date: Thu, 10 Sep 2020 08:55:06 -0500 Subject: [PATCH] Fix winapi issues from flock() rework (#94) --- Cargo.lock | 1 + Cargo.toml | 3 +++ src/lib.rs | 2 ++ 3 files changed, 6 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index a596519..78deb96 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -41,6 +41,7 @@ dependencies = [ "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 3dcd7cc..268bbe4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,6 +31,9 @@ default-features = false version = "0.9.1" default-features = false +[target.'cfg(windows)'.dependencies] +winapi = { version = "0.3", features = ["winerror", "fileapi", "winbase", "std"] } + [dev-dependencies] lazy_static = "1.4" diff --git a/src/lib.rs b/src/lib.rs index 66a9919..44bba5c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -13,6 +13,8 @@ extern crate serde_derive; extern crate tempfile; extern crate toml; extern crate walkdir; +#[cfg(windows)] +extern crate winapi; use std::hash::{Hash, Hasher}; use std::path::{Path, PathBuf};