Skip to content

Disable vm-memory default features#230

Open
germag wants to merge 1 commit intorust-vmm:mainfrom
germag:disable-vm-memory-default-feat
Open

Disable vm-memory default features#230
germag wants to merge 1 commit intorust-vmm:mainfrom
germag:disable-vm-memory-default-feat

Conversation

@germag
Copy link

@germag germag commented Mar 26, 2026

Summary of the PR

By default vm-memory enables the "rawfd" feature, which causes the compilation to fail on windows.

Requirements

  • All commits in this PR have Signed-Off-By trailers (with
    git commit -s), and the commit message has max 60 characters for the
    summary and max 75 characters for each description line.
  • All added/changed functionality has a corresponding unit/integration
    test.
  • All added/changed public-facing functionality has entries in the "Upcoming
    Release" section of CHANGELOG.md (if no such section exists, please create one).
  • Any newly added unsafe code is properly documented.

By default vm-memory enables the "rawfd" feature, which causes the
compilation to fail on windows.

Signed-off-by: German Maglione <gmaglione@redhat.com>
Comment on lines 218 to 223
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() {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is correct, since the fds_bits's size will be incorrect, should I change fds_bits to [::std::os::raw::c_ulonglong; 16usize] on Windows?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines 253 to 255
pub type __kernel_old_dev_t = ::std::os::raw::c_ulong;
pub type __kernel_long_t = ::std::os::raw::c_long;
pub type __kernel_ulong_t = ::std::os::raw::c_ulong;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same with these, should be changed to c_ulonglong ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant