Skip to content

Commit 14fd402

Browse files
committed
s/usize/libc::size_t as suggested by Philipp Matthias Schäfer
1 parent e4c05fc commit 14fd402

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/sys/socket/ffi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pub struct cmsghdr {
3737
pub cmsg_len: type_of_cmsg_len,
3838
pub cmsg_level: c_int,
3939
pub cmsg_type: c_int,
40-
pub cmsg_data: [usize; 0]
40+
pub cmsg_data: [size_t; 0]
4141
}
4242

4343
extern {

src/sys/socket/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ pub enum ControlMessage<'a> {
200200
pub struct UnknownCmsg<'a>(&'a cmsghdr, &'a [u8]);
201201

202202
fn cmsg_align(len: usize) -> usize {
203-
let align_bytes = mem::size_of::<usize>() - 1;
203+
let align_bytes = mem::size_of::<size_t>() - 1;
204204
(len + align_bytes) & !align_bytes
205205
}
206206

0 commit comments

Comments
 (0)