Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux's sockaddr_vm update for kernel >= 5.11. #3478

Merged
merged 1 commit into from
Jan 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4237,6 +4237,8 @@ fn test_linux(target: &str) {
// Linux >= 5.11 tweaked the `svm_zero` field of the `sockaddr_vm` struct.
// https://github.com/torvalds/linux/commit/dc8eeef73b63ed8988224ba6b5ed19a615163a7f
(struct_ == "sockaddr_vm" && field == "svm_zero") ||
// Linux >= 5.11 had added the svm_flags field to the `sockaddr_vm` struct.
(struct_ == "sockaddr_vm" && field == "svm_flags") ||
// the `ifr_ifru` field is an anonymous union
(struct_ == "ifreq" && field == "ifr_ifru") ||
// the `ifc_ifcu` field is an anonymous union
Expand Down
3 changes: 2 additions & 1 deletion src/unix/linux_like/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,8 @@ s! {
pub svm_reserved1: ::c_ushort,
pub svm_port: ::c_uint,
pub svm_cid: ::c_uint,
pub svm_zero: [u8; 4]
pub svm_flags: u8,
pub svm_zero: [u8; 3]
}

pub struct regmatch_t {
Expand Down