Skip to content

Commit 7497d0e

Browse files
committed
hurd: Use more standard types
(backport <rust-lang#3733>) (cherry picked from commit e2fd4d3)
1 parent b2a6bc7 commit 7497d0e

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

src/unix/hurd/mod.rs

+11-12
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ pub type __socklen_t = __u32_type;
7373
pub type __sig_atomic_t = ::c_int;
7474
pub type __time64_t = __int64_t;
7575
pub type ssize_t = __ssize_t;
76-
pub type size_t = ::c_ulong;
7776
pub type wchar_t = ::c_int;
7877
pub type wint_t = ::c_uint;
7978
pub type gid_t = __gid_t;
@@ -341,19 +340,19 @@ s! {
341340
pub ai_family: ::c_int,
342341
pub ai_socktype: ::c_int,
343342
pub ai_protocol: ::c_int,
344-
pub ai_addrlen: socklen_t,
343+
pub ai_addrlen: ::socklen_t,
345344
pub ai_addr: *mut sockaddr,
346345
pub ai_canonname: *mut ::c_char,
347346
pub ai_next: *mut addrinfo,
348347
}
349348

350349
pub struct msghdr {
351350
pub msg_name: *mut ::c_void,
352-
pub msg_namelen: socklen_t,
351+
pub msg_namelen: ::socklen_t,
353352
pub msg_iov: *mut ::iovec,
354353
pub msg_iovlen: ::c_int,
355354
pub msg_control: *mut ::c_void,
356-
pub msg_controllen: socklen_t,
355+
pub msg_controllen: ::socklen_t,
357356
pub msg_flags: ::c_int,
358357
}
359358

@@ -683,8 +682,8 @@ s! {
683682
pub struct __pthread_attr {
684683
pub __schedparam: sched_param,
685684
pub __stackaddr: *mut ::c_void,
686-
pub __stacksize: size_t,
687-
pub __guardsize: size_t,
685+
pub __stacksize: ::size_t,
686+
pub __guardsize: ::size_t,
688687
pub __detachstate: __pthread_detachstate,
689688
pub __inheritsched: __pthread_inheritsched,
690689
pub __contentionscope: __pthread_contentionscope,
@@ -733,7 +732,7 @@ s! {
733732

734733
pub struct iovec {
735734
pub iov_base: *mut ::c_void,
736-
pub iov_len: size_t,
735+
pub iov_len: ::size_t,
737736
}
738737

739738
pub struct passwd {
@@ -3651,13 +3650,13 @@ extern "C" {
36513650
__iovec: *const ::iovec,
36523651
__count: ::c_int,
36533652
__offset: __off_t,
3654-
) -> ssize_t;
3653+
) -> ::ssize_t;
36553654
pub fn pwritev(
36563655
__fd: ::c_int,
36573656
__iovec: *const ::iovec,
36583657
__count: ::c_int,
36593658
__offset: __off_t,
3660-
) -> ssize_t;
3659+
) -> ::ssize_t;
36613660

36623661
pub fn preadv64(
36633662
fd: ::c_int,
@@ -3738,7 +3737,7 @@ extern "C" {
37383737
pub fn fsetpos64(stream: *mut ::FILE, ptr: *const fpos64_t) -> ::c_int;
37393738
pub fn ftello64(stream: *mut ::FILE) -> ::off64_t;
37403739

3741-
pub fn bind(__fd: ::c_int, __addr: *const sockaddr, __len: socklen_t) -> ::c_int;
3740+
pub fn bind(__fd: ::c_int, __addr: *const sockaddr, __len: ::socklen_t) -> ::c_int;
37423741

37433742
pub fn accept4(
37443743
fd: ::c_int,
@@ -3756,7 +3755,7 @@ extern "C" {
37563755

37573756
pub fn recvmsg(__fd: ::c_int, __message: *mut msghdr, __flags: ::c_int) -> ::ssize_t;
37583757

3759-
pub fn sendmsg(__fd: ::c_int, __message: *const msghdr, __flags: ::c_int) -> ssize_t;
3758+
pub fn sendmsg(__fd: ::c_int, __message: *const msghdr, __flags: ::c_int) -> ::ssize_t;
37603759

37613760
pub fn recvfrom(
37623761
socket: ::c_int,
@@ -4360,7 +4359,7 @@ extern "C" {
43604359

43614360
pub fn mmap64(
43624361
__addr: *mut ::c_void,
4363-
__len: size_t,
4362+
__len: ::size_t,
43644363
__prot: ::c_int,
43654364
__flags: ::c_int,
43664365
__fd: ::c_int,

0 commit comments

Comments
 (0)