@@ -10,6 +10,11 @@ pub type sa_family_t = u8;
10
10
pub type pthread_t = :: uintptr_t ;
11
11
pub type nfds_t = :: c_uint ;
12
12
13
+ #[ cfg( not( target_os = "dragonfly" ) ) ]
14
+ const UTSNAME_LEN : usize = 256 ;
15
+ #[ cfg( target_os = "dragonfly" ) ]
16
+ const UTSNAME_LEN : usize = 32 ;
17
+
13
18
s ! {
14
19
pub struct sockaddr {
15
20
pub sa_len: u8 ,
85
90
}
86
91
87
92
pub struct utsname {
88
- #[ cfg( not( target_os = "dragonfly" ) ) ]
89
- pub sysname: [ :: c_char; 256 ] ,
90
- #[ cfg( target_os = "dragonfly" ) ]
91
- pub sysname: [ :: c_char; 32 ] ,
92
- #[ cfg( not( target_os = "dragonfly" ) ) ]
93
- pub nodename: [ :: c_char; 256 ] ,
94
- #[ cfg( target_os = "dragonfly" ) ]
95
- pub nodename: [ :: c_char; 32 ] ,
96
- #[ cfg( not( target_os = "dragonfly" ) ) ]
97
- pub release: [ :: c_char; 256 ] ,
98
- #[ cfg( target_os = "dragonfly" ) ]
99
- pub release: [ :: c_char; 32 ] ,
100
- #[ cfg( not( target_os = "dragonfly" ) ) ]
101
- pub version: [ :: c_char; 256 ] ,
102
- #[ cfg( target_os = "dragonfly" ) ]
103
- pub version: [ :: c_char; 32 ] ,
104
- #[ cfg( not( target_os = "dragonfly" ) ) ]
105
- pub machine: [ :: c_char; 256 ] ,
106
- #[ cfg( target_os = "dragonfly" ) ]
107
- pub machine: [ :: c_char; 32 ] ,
93
+ pub sysname: [ :: c_char; UTSNAME_LEN ] ,
94
+ pub nodename: [ :: c_char; UTSNAME_LEN ] ,
95
+ pub release: [ :: c_char; UTSNAME_LEN ] ,
96
+ pub version: [ :: c_char; UTSNAME_LEN ] ,
97
+ pub machine: [ :: c_char; UTSNAME_LEN ] ,
108
98
}
109
99
110
100
pub struct msghdr {
0 commit comments