Skip to content

Commit b76c4bc

Browse files
authored
Merge pull request #3992 from pinotree/hurd-fix-utsname
hurd: fix definition of utsname struct
2 parents f68f68c + 158cd30 commit b76c4bc

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/unix/hurd/mod.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -872,12 +872,11 @@ s! {
872872
}
873873

874874
pub struct utsname {
875-
pub sysname: [::c_char; 65],
876-
pub nodename: [::c_char; 65],
877-
pub release: [::c_char; 65],
878-
pub version: [::c_char; 65],
879-
pub machine: [::c_char; 65],
880-
pub domainname: [::c_char; 65]
875+
pub sysname: [::c_char; _UTSNAME_LENGTH],
876+
pub nodename: [::c_char; _UTSNAME_LENGTH],
877+
pub release: [::c_char; _UTSNAME_LENGTH],
878+
pub version: [::c_char; _UTSNAME_LENGTH],
879+
pub machine: [::c_char; _UTSNAME_LENGTH],
881880
}
882881

883882
pub struct rlimit64 {
@@ -3436,6 +3435,9 @@ pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
34363435
};
34373436
pub const PTHREAD_STACK_MIN: ::size_t = 0;
34383437

3438+
// Non-public helper constants
3439+
const _UTSNAME_LENGTH: usize = 1024;
3440+
34393441
const_fn! {
34403442
{const} fn CMSG_ALIGN(len: usize) -> usize {
34413443
len + ::mem::size_of::<usize>() - 1 & !(::mem::size_of::<usize>() - 1)

0 commit comments

Comments
 (0)