Skip to content

Commit e91983d

Browse files
committed
struct utsname has a different size on DragonFly
1 parent 054147a commit e91983d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/unix/bsd/mod.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ s! {
8484
pub tm_zone: *mut ::c_char,
8585
}
8686

87+
#[cfg(not(target_os = "dragonfly"))]
8788
pub struct utsname {
8889
pub sysname: [::c_char; 256],
8990
pub nodename: [::c_char; 256],
@@ -92,6 +93,15 @@ s! {
9293
pub machine: [::c_char; 256],
9394
}
9495

96+
#[cfg(target_os = "dragonfly")]
97+
pub struct utsname {
98+
pub sysname: [::c_char; 32],
99+
pub nodename: [::c_char; 32],
100+
pub release: [::c_char; 32],
101+
pub version: [::c_char; 32],
102+
pub machine: [::c_char; 32],
103+
}
104+
95105
pub struct msghdr {
96106
pub msg_name: *mut ::c_void,
97107
pub msg_namelen: ::socklen_t,

0 commit comments

Comments
 (0)