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

hurd: fix definition of utsname struct #3992

Merged
merged 1 commit into from
Oct 20, 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
14 changes: 8 additions & 6 deletions src/unix/hurd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -872,12 +872,11 @@ s! {
}

pub struct utsname {
pub sysname: [::c_char; 65],
pub nodename: [::c_char; 65],
pub release: [::c_char; 65],
pub version: [::c_char; 65],
pub machine: [::c_char; 65],
pub domainname: [::c_char; 65]
pub sysname: [::c_char; _UTSNAME_LENGTH],
pub nodename: [::c_char; _UTSNAME_LENGTH],
pub release: [::c_char; _UTSNAME_LENGTH],
pub version: [::c_char; _UTSNAME_LENGTH],
pub machine: [::c_char; _UTSNAME_LENGTH],
}

pub struct rlimit64 {
Expand Down Expand Up @@ -3436,6 +3435,9 @@ pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
};
pub const PTHREAD_STACK_MIN: ::size_t = 0;

// Non-public helper constants
const _UTSNAME_LENGTH: usize = 1024;

const_fn! {
{const} fn CMSG_ALIGN(len: usize) -> usize {
len + ::mem::size_of::<usize>() - 1 & !(::mem::size_of::<usize>() - 1)
Expand Down