Skip to content

Commit b55a097

Browse files
committed
Auto merge of #3478 - devnexen:sockaddr_vm_upd, r=JohnTitor
linux's sockaddr_vm update for kernel >= 5.11. close #3460
2 parents 77fb037 + 0d8671c commit b55a097

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

libc-test/build.rs

+2
Original file line numberDiff line numberDiff line change
@@ -4317,6 +4317,8 @@ fn test_linux(target: &str) {
43174317
// Linux >= 5.11 tweaked the `svm_zero` field of the `sockaddr_vm` struct.
43184318
// https://github.com/torvalds/linux/commit/dc8eeef73b63ed8988224ba6b5ed19a615163a7f
43194319
(struct_ == "sockaddr_vm" && field == "svm_zero") ||
4320+
// Linux >= 5.11 had added the svm_flags field to the `sockaddr_vm` struct.
4321+
(struct_ == "sockaddr_vm" && field == "svm_flags") ||
43204322
// the `ifr_ifru` field is an anonymous union
43214323
(struct_ == "ifreq" && field == "ifr_ifru") ||
43224324
// the `ifc_ifcu` field is an anonymous union

src/unix/linux_like/linux/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,8 @@ s! {
509509
pub svm_reserved1: ::c_ushort,
510510
pub svm_port: ::c_uint,
511511
pub svm_cid: ::c_uint,
512-
pub svm_zero: [u8; 4]
512+
pub svm_flags: u8,
513+
pub svm_zero: [u8; 3]
513514
}
514515

515516
pub struct regmatch_t {

0 commit comments

Comments
 (0)