Skip to content

Commit

Permalink
Auto merge of #3478 - devnexen:sockaddr_vm_upd, r=JohnTitor
Browse files Browse the repository at this point in the history
linux's sockaddr_vm update for kernel >= 5.11.

close #3460
  • Loading branch information
bors committed Jan 7, 2024
2 parents 77fb037 + 0d8671c commit b55a097
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4317,6 +4317,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

0 comments on commit b55a097

Please sign in to comment.