Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0.2] Backport: hurd: Use more standard types #4025

Merged
merged 1 commit into from
Nov 12, 2024
Merged
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
23 changes: 11 additions & 12 deletions src/unix/hurd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ pub type __socklen_t = __u32_type;
pub type __sig_atomic_t = ::c_int;
pub type __time64_t = __int64_t;
pub type ssize_t = __ssize_t;
pub type size_t = ::c_ulong;
pub type wchar_t = ::c_int;
pub type wint_t = ::c_uint;
pub type gid_t = __gid_t;
Expand Down Expand Up @@ -341,19 +340,19 @@ s! {
pub ai_family: ::c_int,
pub ai_socktype: ::c_int,
pub ai_protocol: ::c_int,
pub ai_addrlen: socklen_t,
pub ai_addrlen: ::socklen_t,
pub ai_addr: *mut sockaddr,
pub ai_canonname: *mut ::c_char,
pub ai_next: *mut addrinfo,
}

pub struct msghdr {
pub msg_name: *mut ::c_void,
pub msg_namelen: socklen_t,
pub msg_namelen: ::socklen_t,
pub msg_iov: *mut ::iovec,
pub msg_iovlen: ::c_int,
pub msg_control: *mut ::c_void,
pub msg_controllen: socklen_t,
pub msg_controllen: ::socklen_t,
pub msg_flags: ::c_int,
}

Expand Down Expand Up @@ -683,8 +682,8 @@ s! {
pub struct __pthread_attr {
pub __schedparam: sched_param,
pub __stackaddr: *mut ::c_void,
pub __stacksize: size_t,
pub __guardsize: size_t,
pub __stacksize: ::size_t,
pub __guardsize: ::size_t,
pub __detachstate: __pthread_detachstate,
pub __inheritsched: __pthread_inheritsched,
pub __contentionscope: __pthread_contentionscope,
Expand Down Expand Up @@ -733,7 +732,7 @@ s! {

pub struct iovec {
pub iov_base: *mut ::c_void,
pub iov_len: size_t,
pub iov_len: ::size_t,
}

pub struct passwd {
Expand Down Expand Up @@ -3651,13 +3650,13 @@ extern "C" {
__iovec: *const ::iovec,
__count: ::c_int,
__offset: __off_t,
) -> ssize_t;
) -> ::ssize_t;
pub fn pwritev(
__fd: ::c_int,
__iovec: *const ::iovec,
__count: ::c_int,
__offset: __off_t,
) -> ssize_t;
) -> ::ssize_t;

pub fn preadv64(
fd: ::c_int,
Expand Down Expand Up @@ -3738,7 +3737,7 @@ extern "C" {
pub fn fsetpos64(stream: *mut ::FILE, ptr: *const fpos64_t) -> ::c_int;
pub fn ftello64(stream: *mut ::FILE) -> ::off64_t;

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

pub fn accept4(
fd: ::c_int,
Expand All @@ -3756,7 +3755,7 @@ extern "C" {

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

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

pub fn recvfrom(
socket: ::c_int,
Expand Down Expand Up @@ -4360,7 +4359,7 @@ extern "C" {

pub fn mmap64(
__addr: *mut ::c_void,
__len: size_t,
__len: ::size_t,
__prot: ::c_int,
__flags: ::c_int,
__fd: ::c_int,
Expand Down