Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/fuchsia/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ s! {

pub struct sockaddr_vm {
pub svm_family: sa_family_t,
pub svm_reserved1: c_ushort,
svm_reserved1: Padding<c_ushort>,
pub svm_port: crate::in_port_t,
pub svm_cid: c_uint,
pub svm_zero: [u8; 4],
Expand Down Expand Up @@ -890,7 +890,7 @@ s! {
pub totalhigh: c_ulong,
pub freehigh: c_ulong,
pub mem_unit: c_uint,
pub __reserved: [c_char; 256],
__reserved: Padding<[c_char; 256]>,
}

pub struct sockaddr_un {
Expand Down
16 changes: 8 additions & 8 deletions src/unix/aix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ s! {

pub struct xutsname {
pub nid: c_uint,
pub reserved: c_int,
reserved: Padding<c_int>,
pub longnid: c_ulonglong,
}

Expand Down Expand Up @@ -368,7 +368,7 @@ s! {
pub struct sched_param {
pub sched_priority: c_int,
pub sched_policy: c_int,
pub sched_reserved: [c_int; 6],
sched_reserved: Padding<[c_int; 6]>,
}

pub struct stack_t {
Expand Down Expand Up @@ -443,7 +443,7 @@ s! {
pub re_esub: [*mut c_void; 24],
pub re_map: *mut c_uchar,
pub __maxsub: c_int,
pub __unused: [*mut c_void; 34],
__unused: Padding<[*mut c_void; 34]>,
}

pub struct rlimit64 {
Expand All @@ -465,8 +465,8 @@ s! {
pub shm_extshm: c_int,
pub shm_pagesize: crate::int64_t,
pub shm_lba: crate::uint64_t,
pub shm_reserved0: crate::int64_t,
pub shm_reserved1: crate::int64_t,
shm_reserved0: Padding<crate::int64_t>,
shm_reserved1: Padding<crate::int64_t>,
}

pub struct stat64 {
Expand All @@ -488,7 +488,7 @@ s! {
pub st_vfs: c_uint,
pub st_type: c_uint,
pub st_gen: c_uint,
pub st_reserved: [c_uint; 10],
st_reserved: Padding<[c_uint; 10]>,
pub st_size: off64_t,
}

Expand All @@ -508,7 +508,7 @@ s! {
pub cgid: crate::gid_t,
pub mode: mode_t,
pub seq: c_ushort,
pub __reserved: c_ushort,
__reserved: Padding<c_ushort>,
pub key: key_t,
}

Expand Down Expand Up @@ -552,7 +552,7 @@ s! {
pub events: c_short,
pub fd: c_int,
pub u: __poll_ctl_ext_u,
pub reserved64: [u64; 6],
reserved64: Padding<[u64; 6]>,
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/unix/aix/powerpc64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ s! {
pub st_vfs: c_uint,
pub st_type: c_uint,
pub st_gen: c_uint,
pub st_reserved: [c_uint; 9],
st_reserved: Padding<[c_uint; 9]>,
pub st_padto_ll: c_uint,
pub st_size: off_t,
}
Expand Down Expand Up @@ -117,7 +117,7 @@ s! {
pub aio_word2: c_int,
pub aio_fp: c_int,
pub aio_handle: *mut aiocb,
pub aio_reserved: [c_uint; 2],
aio_reserved: Padding<[c_uint; 2]>,
pub aio_sigev_tid: c_long,
}

Expand Down Expand Up @@ -191,7 +191,7 @@ s! {
pub __ukeys: [c_uint; 2],
pub __vsx: crate::__vsx_context_t,
pub __tm: crate::__tm_context_t,
pub __reserved: [c_char; 1860],
__reserved: Padding<[c_char; 1860]>,
pub __extctx_magic: c_int,
}

Expand Down
8 changes: 4 additions & 4 deletions src/unix/bsd/freebsdlike/dragonfly/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ s! {
pub time_low: u32,
pub time_mid: u16,
pub time_hi_and_version: u16,
pub clock_seq_hi_and_reserved: u8,
clock_seq_hi_and_reserved: Padding<u8>,
pub clock_seq_low: u8,
pub node: [u8; 6],
}
Expand Down Expand Up @@ -140,7 +140,7 @@ s! {
pub st_nlink: crate::nlink_t,
pub st_dev: crate::dev_t,
pub st_mode: crate::mode_t,
pub st_padding1: u16,
st_padding1: Padding<u16>,
pub st_uid: crate::uid_t,
pub st_gid: crate::gid_t,
pub st_rdev: crate::dev_t,
Expand Down Expand Up @@ -417,14 +417,14 @@ s! {
pub ut_line: [c_char; 32],
pub ut_host: [c_char; 256],

pub ut_unused: [u8; 16],
ut_unused: Padding<[u8; 16]>,
pub ut_session: u16,
pub ut_type: u16,
pub ut_pid: crate::pid_t,
ut_exit: exit_status,
ut_ss: crate::sockaddr_storage,
pub ut_tv: crate::timeval,
pub ut_unused2: [u8; 16],
ut_unused2: Padding<[u8; 16]>,
}

pub struct lastlogx {
Expand Down
6 changes: 3 additions & 3 deletions src/unix/bsd/freebsdlike/freebsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ s! {
pub time_low: u32,
pub time_mid: u16,
pub time_hi_and_version: u16,
pub clock_seq_hi_and_reserved: u8,
clock_seq_hi_and_reserved: Padding<u8>,
pub clock_seq_low: u8,
pub node: [u8; _UUID_NODE_LEN],
}
Expand Down Expand Up @@ -488,8 +488,8 @@ s! {
pub ksw_used: u_int,
pub ksw_total: u_int,
pub ksw_flags: c_int,
pub ksw_reserved1: u_int,
pub ksw_reserved2: u_int,
ksw_reserved1: Padding<u_int>,
ksw_reserved2: Padding<u_int>,
}

pub struct nlist {
Expand Down
2 changes: 1 addition & 1 deletion src/unix/bsd/netbsdlike/netbsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ s! {
}

pub struct uucred {
pub cr_unused: c_ushort,
cr_unused: Padding<c_ushort>,
pub cr_uid: crate::uid_t,
pub cr_gid: crate::gid_t,
pub cr_ngroups: c_short,
Expand Down
4 changes: 2 additions & 2 deletions src/unix/cygwin/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ s! {
pub struct _uc_fpxreg {
pub significand: [u16; 4],
pub exponent: u16,
pub padding: [u16; 3],
padding: Padding<[u16; 3]>,
}

pub struct _uc_xmmreg {
Expand All @@ -286,7 +286,7 @@ s! {
pub mxcr_mask: u32,
pub st: [_uc_fpxreg; 8],
pub xmm: [_uc_xmmreg; 16],
pub padding: [u32; 24],
padding: Padding<[u32; 24]>,
}

#[repr(align(16))]
Expand Down
2 changes: 1 addition & 1 deletion src/unix/haiku/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ s! {
pub struct sem_t {
pub type_: i32,
pub named_sem_id: i32, // actually a union with unnamed_sem (i32)
pub padding: [i32; 2],
padding: Padding<[i32; 2]>,
}

pub struct ucred {
Expand Down
4 changes: 2 additions & 2 deletions src/unix/haiku/x86_64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ s! {
pub mscsr_mask: c_uint,
pub _fpreg: [[c_uchar; 8]; 16],
pub _xmm: [[c_uchar; 16]; 16],
pub _reserved_416_511: [c_uchar; 96],
_reserved_416_511: Padding<[c_uchar; 96]>,
}

pub struct xstate_hdr {
pub bv: c_ulong,
pub xcomp_bv: c_ulong,
pub _reserved: [c_uchar; 48],
_reserved: Padding<[c_uchar; 48]>,
}

pub struct savefpu {
Expand Down
12 changes: 6 additions & 6 deletions src/unix/hurd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,8 @@ s! {
pub struct sockaddr_storage {
pub ss_len: c_uchar,
pub ss_family: sa_family_t,
pub __ss_padding: [c_char; 122usize],
pub __ss_align: __uint32_t,
__ss_padding: Padding<[c_char; 122usize]>,
__ss_align: __uint32_t,
}

pub struct sockaddr_at {
Expand Down Expand Up @@ -634,8 +634,8 @@ s! {
pub __shpid: c_int,
pub __type: c_int,
pub __flags: c_int,
pub __reserved1: c_uint,
pub __reserved2: c_uint,
__reserved1: Padding<c_uint>,
__reserved2: Padding<c_uint>,
}

pub struct __pthread_condattr {
Expand Down Expand Up @@ -3330,8 +3330,8 @@ pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
__shpid: 0,
__type: PTHREAD_MUTEX_TIMED as c_int,
__flags: 0,
__reserved1: 0,
__reserved2: 0,
__reserved1: Padding::uninit(),
__reserved2: Padding::uninit(),
};
pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
__lock: __PTHREAD_SPIN_LOCK_INITIALIZER,
Expand Down
2 changes: 1 addition & 1 deletion src/unix/newlib/arm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ s! {

pub struct sockaddr_storage {
pub ss_family: crate::sa_family_t,
pub __ss_padding: [u8; 26],
__ss_padding: Padding<[u8; 26]>,
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/unix/newlib/horizon/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ s! {

pub struct sockaddr_storage {
pub ss_family: crate::sa_family_t,
pub __ss_padding: [c_char; 26usize],
__ss_padding: Padding<[c_char; 26usize]>,
}

pub struct sockaddr_in {
Expand Down
6 changes: 3 additions & 3 deletions src/unix/newlib/vita/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ s! {
pub struct sockaddr_storage {
pub ss_len: u8,
pub ss_family: crate::sa_family_t,
pub __ss_pad1: [u8; 2],
pub __ss_align: i64,
pub __ss_pad2: [u8; 116],
__ss_pad1: Padding<[u8; 2]>,
__ss_align: i64,
__ss_pad2: Padding<[u8; 116]>,
}

pub struct sched_param {
Expand Down
12 changes: 6 additions & 6 deletions src/unix/nto/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ s! {
pub struct dirent_extra {
pub d_datalen: u16,
pub d_type: u16,
pub d_reserved: u32,
d_reserved: Padding<u32>,
}

pub struct stat {
Expand Down Expand Up @@ -182,14 +182,14 @@ s! {
pub struct sched_param {
pub sched_priority: c_int,
pub sched_curpriority: c_int,
pub reserved: [c_int; 10],
reserved: Padding<[c_int; 10]>,
}

#[repr(align(8))]
pub struct __sched_param {
pub __sched_priority: c_int,
pub __sched_curpriority: c_int,
pub reserved: [c_int; 10],
reserved: Padding<[c_int; 10]>,
}

pub struct Dl_info {
Expand Down Expand Up @@ -236,7 +236,7 @@ s! {
pub _Yes: *mut c_char,
pub _Nostr: *mut c_char,
pub _Yesstr: *mut c_char,
pub _Reserved: [*mut c_char; 8],
_Reserved: Padding<[*mut c_char; 8]>,
}

// Does not exist in io-sock
Expand Down Expand Up @@ -694,9 +694,9 @@ s! {

pub struct sigevent {
pub sigev_notify: c_int,
pub __padding1: c_int,
__padding1: Padding<c_int>,
pub sigev_signo: c_int, // union
pub __padding2: c_int,
__padding2: Padding<c_int>,
pub sigev_value: crate::sigval,
__sigev_un2: usize, // union
}
Expand Down
14 changes: 7 additions & 7 deletions src/vxworks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,10 @@ s! {
pub st_blksize: crate::blksize_t,
pub st_blocks: crate::blkcnt_t,
pub st_attrib: c_uchar,
pub st_reserved1: c_int,
pub st_reserved2: c_int,
pub st_reserved3: c_int,
pub st_reserved4: c_int,
st_reserved1: Padding<c_int>,
st_reserved2: Padding<c_int>,
st_reserved3: Padding<c_int>,
st_reserved4: Padding<c_int>,
}

//b_struct__Timespec.h
Expand Down Expand Up @@ -587,9 +587,9 @@ s_no_extra_traits! {
pub struct sockaddr_storage {
pub ss_len: c_uchar,
pub ss_family: crate::sa_family_t,
pub __ss_pad1: [c_char; _SS_PAD1SIZE],
pub __ss_align: i32,
pub __ss_pad2: [c_char; _SS_PAD2SIZE],
__ss_pad1: Padding<[c_char; _SS_PAD1SIZE]>,
__ss_align: i32,
__ss_pad2: Padding<[c_char; _SS_PAD2SIZE]>,
}

pub union sa_u_t {
Expand Down