Skip to content
Open
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
4 changes: 2 additions & 2 deletions src/new/apple/xnu/mach/i386/_structs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ s! {
}

pub struct __darwin_x86_float_state64 {
pub __fpu_reserved: [c_int; 2],
__fpu_reserved: Padding<[c_int; 2]>,
__fpu_fcw: c_short,
__fpu_fsw: c_short,
pub __fpu_ftw: u8,
Expand Down Expand Up @@ -87,6 +87,6 @@ s! {
// FIXME(apple): this field is actually [u8; 96], but defining it with a bigger type allows
// us to auto-implement traits for it since the length of the array is less than 32
__fpu_rsrv4: [u32; 24],
pub __fpu_reserved1: c_int,
__fpu_reserved1: Padding<c_int>,
}
}
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/apple/b32/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ s! {
pub ifi_hdrlen: c_uchar,
pub ifi_recvquota: c_uchar,
pub ifi_xmitquota: c_uchar,
pub ifi_unused1: c_uchar,
ifi_unused1: Padding<c_uchar>,
pub ifi_mtu: u32,
pub ifi_metric: u32,
pub ifi_baudrate: u32,
Expand All @@ -31,10 +31,10 @@ s! {
pub ifi_recvtiming: u32,
pub ifi_xmittiming: u32,
pub ifi_lastchange: crate::timeval,
pub ifi_unused2: u32,
ifi_unused2: Padding<u32>,
pub ifi_hwassist: u32,
pub ifi_reserved1: u32,
pub ifi_reserved2: u32,
ifi_reserved1: Padding<u32>,
ifi_reserved2: Padding<u32>,
}

pub struct bpf_hdr {
Expand Down
8 changes: 4 additions & 4 deletions src/unix/bsd/apple/b64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ s! {
pub ifi_hdrlen: c_uchar,
pub ifi_recvquota: c_uchar,
pub ifi_xmitquota: c_uchar,
pub ifi_unused1: c_uchar,
ifi_unused1: Padding<c_uchar>,
pub ifi_mtu: u32,
pub ifi_metric: u32,
pub ifi_baudrate: u32,
Expand All @@ -34,10 +34,10 @@ s! {
pub ifi_recvtiming: u32,
pub ifi_xmittiming: u32,
pub ifi_lastchange: timeval32,
pub ifi_unused2: u32,
ifi_unused2: Padding<u32>,
pub ifi_hwassist: u32,
pub ifi_reserved1: u32,
pub ifi_reserved2: u32,
ifi_reserved1: Padding<u32>,
ifi_reserved2: Padding<u32>,
}

pub struct bpf_hdr {
Expand Down
22 changes: 11 additions & 11 deletions src/unix/bsd/apple/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,10 +333,10 @@ s! {
}

pub struct fpunchhole_t {
pub fp_flags: c_uint, /* unused */
pub reserved: c_uint, /* (to maintain 8-byte alignment) */
pub fp_offset: off_t, /* IN: start of the region */
pub fp_length: off_t, /* IN: size of the region */
pub fp_flags: c_uint, /* unused */
reserved: Padding<c_uint>, /* (to maintain 8-byte alignment) */
pub fp_offset: off_t, /* IN: start of the region */
pub fp_length: off_t, /* IN: size of the region */
}

pub struct ftrimactivefile_t {
Expand All @@ -346,7 +346,7 @@ s! {

pub struct fspecread_t {
pub fsr_flags: c_uint,
pub reserved: c_uint,
reserved: Padding<c_uint>,
pub fsr_offset: off_t,
pub fsr_length: off_t,
}
Expand Down Expand Up @@ -485,7 +485,7 @@ s! {
pub rtm_addrs: c_int,
pub rtm_refcnt: i32,
pub rtm_parentflags: c_int,
pub rtm_reserved: c_int,
rtm_reserved: Padding<c_int>,
pub rtm_use: c_int,
pub rtm_inits: u32,
pub rtm_rmx: rt_metrics,
Expand Down Expand Up @@ -669,7 +669,7 @@ s! {
pub ss_sysaddr: u16,
pub sc_id: u32,
pub sc_unit: u32,
pub sc_reserved: [u32; 5],
sc_reserved: Padding<[u32; 5]>,
}

pub struct in_pktinfo {
Expand Down Expand Up @@ -1015,7 +1015,7 @@ s! {

pub struct attrlist {
pub bitmapcount: c_ushort,
pub reserved: u16,
reserved: Padding<u16>,
pub commonattr: attrgroup_t,
pub volattr: attrgroup_t,
pub dirattr: attrgroup_t,
Expand Down Expand Up @@ -1285,7 +1285,7 @@ s! {
pub f_mntonname: [c_char; 1024],
pub f_mntfromname: [c_char; 1024],
pub f_flags_ext: u32,
pub f_reserved: [u32; 7],
f_reserved: Padding<[u32; 7]>,
}

pub struct dirent {
Expand Down Expand Up @@ -1392,7 +1392,7 @@ s! {
pub ifi_hdrlen: c_uchar,
pub ifi_recvquota: c_uchar,
pub ifi_xmitquota: c_uchar,
pub ifi_unused1: c_uchar,
ifi_unused1: Padding<c_uchar>,
pub ifi_mtu: u32,
pub ifi_metric: u32,
pub ifi_baudrate: u64,
Expand Down Expand Up @@ -1484,7 +1484,7 @@ s! {
pub struct sockaddr_vm {
pub svm_len: c_uchar,
pub svm_family: crate::sa_family_t,
pub svm_reserved1: c_ushort,
svm_reserved1: Padding<c_ushort>,
pub svm_port: c_uint,
pub svm_cid: c_uint,
}
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 @@ -353,7 +353,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
Loading