diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-03-17 10:32:00 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-03-17 10:33:13 -0700 |
| commit | 71982c21245489fd316fc9e82bf7bec4b09d45a6 (patch) | |
| tree | 0f2fc8493fe14fc93ea48b642dfa87df059bad78 /src | |
| parent | c64d671671aea2e44ee7fc6eb00ee75fc30ed7b9 (diff) | |
| download | rust-71982c21245489fd316fc9e82bf7bec4b09d45a6.tar.gz rust-71982c21245489fd316fc9e82bf7bec4b09d45a6.zip | |
libc: Fix definition of sockaddr_storage on 32-bit linux
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 #23425
Diffstat (limited to 'src')
| -rw-r--r-- | src/liblibc/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/liblibc/lib.rs b/src/liblibc/lib.rs index 82c54004e99..1e1b128d712 100644 --- a/src/liblibc/lib.rs +++ b/src/liblibc/lib.rs @@ -269,8 +269,8 @@ pub mod types { #[repr(C)] #[derive(Copy)] pub struct sockaddr_storage { pub ss_family: sa_family_t, - pub __ss_align: i64, - pub __ss_pad2: [u8; 112], + pub __ss_align: isize, + pub __ss_pad2: [u8; 128 - 2 * (::core::isize::BYTES as usize)], } #[repr(C)] #[derive(Copy)] pub struct sockaddr_in { |
