Skip to content

Commit 51ea3ec

Browse files
bonziniroypat
authored andcommitted
make the winapi dependency optional
winapi is only needed in combination with the mmap backend; do not require it in a no-default-features Windows build. Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 1d0ea88 commit 51ea3ec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ autobenches = false
1414
[features]
1515
default = ["rawfd"]
1616
backend-bitmap = ["dep:libc"]
17-
backend-mmap = ["dep:libc"]
17+
backend-mmap = ["dep:libc", "dep:winapi"]
1818
backend-atomic = ["arc-swap"]
1919
rawfd = ["dep:libc"]
2020
xen = ["backend-mmap", "bitflags", "vmm-sys-util"]
@@ -29,6 +29,7 @@ vmm-sys-util = { version = ">=0.12.1,<=0.14.0", optional = true }
2929
[target.'cfg(target_family = "windows")'.dependencies.winapi]
3030
version = "0.3"
3131
features = ["errhandlingapi", "sysinfoapi"]
32+
optional = true
3233

3334
[dev-dependencies]
3435
criterion = "0.5.0"

0 commit comments

Comments
 (0)