Skip to content

Commit e2fd4d3

Browse files
committed
hurd: Use more standard types
1 parent acc7bb1 commit e2fd4d3

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

@@ -678,8 +677,8 @@ s! {
678677
pub struct __pthread_attr {
679678
pub __schedparam: sched_param,
680679
pub __stackaddr: *mut ::c_void,
681-
pub __stacksize: size_t,
682-
pub __guardsize: size_t,
680+
pub __stacksize: ::size_t,
681+
pub __guardsize: ::size_t,
683682
pub __detachstate: __pthread_detachstate,
684683
pub __inheritsched: __pthread_inheritsched,
685684
pub __contentionscope: __pthread_contentionscope,
@@ -728,7 +727,7 @@ s! {
728727

729728
pub struct iovec {
730729
pub iov_base: *mut ::c_void,
731-
pub iov_len: size_t,
730+
pub iov_len: ::size_t,
732731
}
733732

734733
pub struct passwd {
@@ -3640,13 +3639,13 @@ extern "C" {
36403639
__iovec: *const ::iovec,
36413640
__count: ::c_int,
36423641
__offset: __off_t,
3643-
) -> ssize_t;
3642+
) -> ::ssize_t;
36443643
pub fn pwritev(
36453644
__fd: ::c_int,
36463645
__iovec: *const ::iovec,
36473646
__count: ::c_int,
36483647
__offset: __off_t,
3649-
) -> ssize_t;
3648+
) -> ::ssize_t;
36503649

36513650
pub fn preadv64(
36523651
fd: ::c_int,
@@ -3727,7 +3726,7 @@ extern "C" {
37273726
pub fn fsetpos64(stream: *mut ::FILE, ptr: *const fpos64_t) -> ::c_int;
37283727
pub fn ftello64(stream: *mut ::FILE) -> ::off64_t;
37293728

3730-
pub fn bind(__fd: ::c_int, __addr: *const sockaddr, __len: socklen_t) -> ::c_int;
3729+
pub fn bind(__fd: ::c_int, __addr: *const sockaddr, __len: ::socklen_t) -> ::c_int;
37313730

37323731
pub fn accept4(
37333732
fd: ::c_int,
@@ -3745,7 +3744,7 @@ extern "C" {
37453744

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

3748-
pub fn sendmsg(__fd: ::c_int, __message: *const msghdr, __flags: ::c_int) -> ssize_t;
3747+
pub fn sendmsg(__fd: ::c_int, __message: *const msghdr, __flags: ::c_int) -> ::ssize_t;
37493748

37503749
pub fn recvfrom(
37513750
socket: ::c_int,
@@ -4345,7 +4344,7 @@ extern "C" {
43454344

43464345
pub fn mmap64(
43474346
__addr: *mut ::c_void,
4348-
__len: size_t,
4347+
__len: ::size_t,
43494348
__prot: ::c_int,
43504349
__flags: ::c_int,
43514350
__fd: ::c_int,

0 commit comments

Comments
 (0)