Skip to content

Commit d5b0f29

Browse files
3v1n0tgross35
authored andcommitted
linux, fuchsia: Mark mq_attr padding area as such
As per commit c100954 the hard-coded partial equality implementations have been dropped in favor for auto-generated ones, but they did not work for mq_attr, since the padding area was not typed correctly. Fix this, using the Padding type.
1 parent 9e59266 commit d5b0f29

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/fuchsia/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,7 @@ s! {
941941
#[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
942942
pub mq_curmsgs: i64,
943943
#[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
944-
pad: [i64; 4],
944+
pad: Padding<[i64; 4]>,
945945

946946
#[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
947947
pub mq_flags: c_long,
@@ -952,7 +952,7 @@ s! {
952952
#[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
953953
pub mq_curmsgs: c_long,
954954
#[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
955-
pad: [c_long; 4],
955+
pad: Padding<[c_long; 4]>,
956956
}
957957

958958
pub struct sockaddr_nl {

src/unix/linux_like/emscripten/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ s! {
365365
pub mq_maxmsg: c_long,
366366
pub mq_msgsize: c_long,
367367
pub mq_curmsgs: c_long,
368-
pad: [c_long; 4],
368+
pad: Padding<[c_long; 4]>,
369369
}
370370

371371
#[cfg_attr(target_pointer_width = "32", repr(align(4)))]

src/unix/linux_like/linux/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1424,7 +1424,7 @@ s! {
14241424
#[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
14251425
pub mq_curmsgs: i64,
14261426
#[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
1427-
pad: [i64; 4],
1427+
pad: Padding<[i64; 4]>,
14281428

14291429
#[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
14301430
pub mq_flags: c_long,
@@ -1435,7 +1435,7 @@ s! {
14351435
#[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
14361436
pub mq_curmsgs: c_long,
14371437
#[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
1438-
pad: [c_long; 4],
1438+
pad: Padding<[c_long; 4]>,
14391439
}
14401440

14411441
pub struct hwtstamp_config {

0 commit comments

Comments
 (0)