Skip to content

Commit c341fe9

Browse files
committed
Rollup merge of rust-lang#23450 - alexcrichton:fix-sockaddr-storage, r=brson
The alignment field is actually a \"pointer sized\" type instead of always i64, requiring that the size of the padding field is also calculated slightly differently. Closes rust-lang#23425
2 parents 51bc2f1 + 71982c2 commit c341fe9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/liblibc/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,8 @@ pub mod types {
269269
#[repr(C)]
270270
#[derive(Copy)] pub struct sockaddr_storage {
271271
pub ss_family: sa_family_t,
272-
pub __ss_align: i64,
273-
pub __ss_pad2: [u8; 112],
272+
pub __ss_align: isize,
273+
pub __ss_pad2: [u8; 128 - 2 * (::core::isize::BYTES as usize)],
274274
}
275275
#[repr(C)]
276276
#[derive(Copy)] pub struct sockaddr_in {

0 commit comments

Comments
 (0)