From 9e91456afd7abed130939b755499977a739bb5f8 Mon Sep 17 00:00:00 2001 From: German Maglione Date: Thu, 26 Mar 2026 13:33:21 +0100 Subject: [PATCH] Disable vm-memory default features By default vm-memory enables the "rawfd" feature, which causes the compilation to fail on windows. Signed-off-by: German Maglione --- Cargo.toml | 4 ++-- src/loader_gen/x86_64/bootparam.rs | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c3cad52f..b462a5f8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,11 +26,11 @@ pe = ["elf"] elf = [] [dependencies] -vm-memory = ">=0.16.0, <=0.17.1" +vm-memory = { version = ">=0.16.0, <=0.17.1", default-features = false } [dev-dependencies] criterion = { version = "0.7.0", features = ["html_reports"] } -vm-memory = { version = ">=0.16.0, <=0.17.1", features = ["backend-mmap"] } +vm-memory = { version = ">=0.16.0, <=0.17.1", default-features = false, features = ["backend-mmap"] } [[bench]] name = "main" diff --git a/src/loader_gen/x86_64/bootparam.rs b/src/loader_gen/x86_64/bootparam.rs index 12921cdc..7097d742 100644 --- a/src/loader_gen/x86_64/bootparam.rs +++ b/src/loader_gen/x86_64/bootparam.rs @@ -218,6 +218,8 @@ pub struct __kernel_fd_set { pub fds_bits: [::std::os::raw::c_ulong; 16usize], } #[test] +// On Windows the unsigned long size is 4 bytes, instead of 8 +#[cfg(target_family = "unix")] fn bindgen_test_layout___kernel_fd_set() { const UNINIT: ::std::mem::MaybeUninit<__kernel_fd_set> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr();