|
94 | 94 | pub d_ino: ::ino_t, |
95 | 95 | pub d_reclen: ::c_ushort, |
96 | 96 | pub d_namlen: ::c_ushort, |
97 | | - pub d_name: [::c_char; 256] |
| 97 | + pub d_name: [::c_char; 256], |
98 | 98 | } |
99 | 99 |
|
100 | 100 | pub struct termios { |
101 | 101 | pub c_iflag: ::tcflag_t, |
102 | 102 | pub c_oflag: ::tcflag_t, |
103 | 103 | pub c_cflag: ::tcflag_t, |
104 | 104 | pub c_lflag: ::tcflag_t, |
105 | | - pub c_cc: [::cc_t; ::NCCS] |
| 105 | + pub c_cc: [::cc_t; ::NCCS], |
106 | 106 | } |
107 | 107 |
|
108 | 108 | pub struct flock64 { |
|
139 | 139 | pub f_flag: ::c_ulong, |
140 | 140 | pub f_namemax: ::c_ulong, |
141 | 141 | pub f_fstr: [::c_char; 32], |
142 | | - pub f_filler: [::c_ulong; 16] |
| 142 | + pub f_filler: [::c_ulong; 16], |
143 | 143 | } |
144 | 144 |
|
145 | 145 | pub struct lconv { |
|
180 | 180 | pub tm_year: ::c_int, |
181 | 181 | pub tm_wday: ::c_int, |
182 | 182 | pub tm_yday: ::c_int, |
183 | | - pub tm_isdst: ::c_int |
| 183 | + pub tm_isdst: ::c_int, |
184 | 184 | } |
185 | 185 |
|
186 | 186 | pub struct addrinfo { |
|
196 | 196 | } |
197 | 197 |
|
198 | 198 | pub struct in_addr { |
199 | | - pub s_addr: in_addr_t |
| 199 | + pub s_addr: in_addr_t, |
200 | 200 | } |
201 | 201 |
|
202 | 202 | pub struct ip_mreq_source { |
|
227 | 227 | pub sin_family: sa_family_t, |
228 | 228 | pub sin_port: in_port_t, |
229 | 229 | pub sin_addr: in_addr, |
230 | | - pub sin_zero: [::c_char; 8] |
| 230 | + pub sin_zero: [::c_char; 8], |
231 | 231 | } |
232 | 232 |
|
233 | 233 | pub struct sockaddr_in6 { |
|
236 | 236 | pub sin6_port: ::uint16_t, |
237 | 237 | pub sin6_flowinfo: ::uint32_t, |
238 | 238 | pub sin6_addr: ::in6_addr, |
239 | | - pub sin6_scope_id: ::uint32_t |
| 239 | + pub sin6_scope_id: ::uint32_t, |
240 | 240 | } |
241 | 241 |
|
242 | 242 | pub struct sockaddr_storage { |
|
250 | 250 | pub struct sockaddr_un { |
251 | 251 | pub sun_len: ::c_uchar, |
252 | 252 | pub sun_family: sa_family_t, |
253 | | - pub sun_path: [::c_char; 1023] |
| 253 | + pub sun_path: [::c_char; 1023], |
254 | 254 | } |
255 | 255 |
|
256 | 256 | pub struct st_timespec { |
|
286 | 286 | pub pw_gid: ::gid_t, |
287 | 287 | pub pw_gecos: *mut ::c_char, |
288 | 288 | pub pw_dir: *mut ::c_char, |
289 | | - pub pw_shell: *mut ::c_char |
| 289 | + pub pw_shell: *mut ::c_char, |
290 | 290 | } |
291 | 291 |
|
292 | 292 | pub struct utsname { |
|
313 | 313 | pub sigev_value: ::sigval, |
314 | 314 | pub sigev_signo: ::c_int, |
315 | 315 | pub sigev_notify: ::c_int, |
316 | | - pub sigev_notify_function: extern fn(val: ::sigval), |
| 316 | + pub sigev_notify_function: extern "C" fn(val: ::sigval), |
317 | 317 | pub sigev_notify_attributes: *mut pthread_attr_t, |
318 | 318 | } |
319 | 319 |
|
|
536 | 536 |
|
537 | 537 | s_no_extra_traits! { |
538 | 538 | pub union __sigaction_sa_union { |
539 | | - pub __su_handler: extern fn(c: ::c_int), |
540 | | - pub __su_sigaction: extern fn(c: ::c_int, info: *mut siginfo_t, ptr: *mut ::c_void), |
| 539 | + pub __su_handler: extern "C" fn(c: ::c_int), |
| 540 | + pub __su_sigaction: extern "C" fn(c: ::c_int, info: *mut siginfo_t, ptr: *mut ::c_void), |
541 | 541 | } |
542 | 542 |
|
543 | 543 | pub struct sigaction { |
@@ -2514,8 +2514,9 @@ f! { |
2514 | 2514 | if cmsg.is_null() { |
2515 | 2515 | CMSG_FIRSTHDR(mhdr) |
2516 | 2516 | } else { |
2517 | | - if (cmsg as usize + (*cmsg).cmsg_len as usize + ::mem::size_of::<::cmsghdr>()) > |
2518 | | - ((*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize) { |
| 2517 | + if (cmsg as usize + (*cmsg).cmsg_len as usize + ::mem::size_of::<::cmsghdr>()) |
| 2518 | + > ((*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize) |
| 2519 | + { |
2519 | 2520 | 0 as *mut ::cmsghdr |
2520 | 2521 | } else { |
2521 | 2522 | // AIX does not have any alignment/padding for ancillary data, so we don't need _CMSG_ALIGN here. |
@@ -2546,20 +2547,20 @@ f! { |
2546 | 2547 | let bits = ::mem::size_of::<::c_long>() * 8; |
2547 | 2548 | let fd = fd as usize; |
2548 | 2549 | (*set).fds_bits[fd / bits] |= 1 << (fd % bits); |
2549 | | - return |
| 2550 | + return; |
2550 | 2551 | } |
2551 | 2552 |
|
2552 | 2553 | pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () { |
2553 | 2554 | let bits = ::mem::size_of::<::c_long>() * 8; |
2554 | 2555 | let fd = fd as usize; |
2555 | 2556 | (*set).fds_bits[fd / bits] &= !(1 << (fd % bits)); |
2556 | | - return |
| 2557 | + return; |
2557 | 2558 | } |
2558 | 2559 |
|
2559 | 2560 | pub fn FD_ISSET(fd: ::c_int, set: *const fd_set) -> bool { |
2560 | 2561 | let bits = ::mem::size_of::<::c_long>() * 8; |
2561 | 2562 | let fd = fd as usize; |
2562 | | - return ((*set).fds_bits[fd / bits] & (1 << (fd % bits))) != 0 |
| 2563 | + return ((*set).fds_bits[fd / bits] & (1 << (fd % bits))) != 0; |
2563 | 2564 | } |
2564 | 2565 |
|
2565 | 2566 | pub fn major(dev: ::dev_t) -> ::c_uint { |
|
0 commit comments