1 pub type pthread_t = c_ulong;
2 pub type __priority_which_t = ::c_uint;
3 pub type __rlimit_resource_t = ::c_uint;
4 
5 s! {
6     pub struct statx {
7         pub stx_mask: u32,
8         pub stx_blksize: u32,
9         pub stx_attributes: u64,
10         pub stx_nlink: u32,
11         pub stx_uid: u32,
12         pub stx_gid: u32,
13         pub stx_mode: u16,
14         pub __statx_pad1: [u16; 1],
15         pub stx_ino: u64,
16         pub stx_size: u64,
17         pub stx_blocks: u64,
18         pub stx_attributes_mask: u64,
19         pub stx_atime: ::statx_timestamp,
20         pub stx_btime: ::statx_timestamp,
21         pub stx_ctime: ::statx_timestamp,
22         pub stx_mtime: ::statx_timestamp,
23         pub stx_rdev_major: u32,
24         pub stx_rdev_minor: u32,
25         pub stx_dev_major: u32,
26         pub stx_dev_minor: u32,
27         pub __statx_pad2: [u64; 14],
28     }
29 
30     pub struct statx_timestamp {
31         pub tv_sec: i64,
32         pub tv_nsec: u32,
33         pub __statx_timestamp_pad1: [i32; 1],
34     }
35 
36     pub struct aiocb {
37         pub aio_fildes: ::c_int,
38         pub aio_lio_opcode: ::c_int,
39         pub aio_reqprio: ::c_int,
40         pub aio_buf: *mut ::c_void,
41         pub aio_nbytes: ::size_t,
42         pub aio_sigevent: ::sigevent,
43         __next_prio: *mut aiocb,
44         __abs_prio: ::c_int,
45         __policy: ::c_int,
46         __error_code: ::c_int,
47         __return_value: ::ssize_t,
48         pub aio_offset: off_t,
49         #[cfg(all(not(target_arch = "x86_64"), target_pointer_width = "32"))]
50         __unused1: [::c_char; 4],
51         __glibc_reserved: [::c_char; 32]
52     }
53 
54     pub struct __exit_status {
55         pub e_termination: ::c_short,
56         pub e_exit: ::c_short,
57     }
58 
59     pub struct __timeval {
60         pub tv_sec: i32,
61         pub tv_usec: i32,
62     }
63 
64     pub struct glob64_t {
65         pub gl_pathc: ::size_t,
66         pub gl_pathv: *mut *mut ::c_char,
67         pub gl_offs: ::size_t,
68         pub gl_flags: ::c_int,
69 
70         __unused1: *mut ::c_void,
71         __unused2: *mut ::c_void,
72         __unused3: *mut ::c_void,
73         __unused4: *mut ::c_void,
74         __unused5: *mut ::c_void,
75     }
76 
77     pub struct msghdr {
78         pub msg_name: *mut ::c_void,
79         pub msg_namelen: ::socklen_t,
80         pub msg_iov: *mut ::iovec,
81         pub msg_iovlen: ::size_t,
82         pub msg_control: *mut ::c_void,
83         pub msg_controllen: ::size_t,
84         pub msg_flags: ::c_int,
85     }
86 
87     pub struct cmsghdr {
88         pub cmsg_len: ::size_t,
89         pub cmsg_level: ::c_int,
90         pub cmsg_type: ::c_int,
91     }
92 
93     pub struct termios {
94         pub c_iflag: ::tcflag_t,
95         pub c_oflag: ::tcflag_t,
96         pub c_cflag: ::tcflag_t,
97         pub c_lflag: ::tcflag_t,
98         pub c_line: ::cc_t,
99         pub c_cc: [::cc_t; ::NCCS],
100         #[cfg(not(any(
101             target_arch = "sparc64",
102             target_arch = "mips",
103             target_arch = "mips64")))]
104         pub c_ispeed: ::speed_t,
105         #[cfg(not(any(
106             target_arch = "sparc64",
107             target_arch = "mips",
108             target_arch = "mips64")))]
109         pub c_ospeed: ::speed_t,
110     }
111 
112     pub struct mallinfo {
113         pub arena: ::c_int,
114         pub ordblks: ::c_int,
115         pub smblks: ::c_int,
116         pub hblks: ::c_int,
117         pub hblkhd: ::c_int,
118         pub usmblks: ::c_int,
119         pub fsmblks: ::c_int,
120         pub uordblks: ::c_int,
121         pub fordblks: ::c_int,
122         pub keepcost: ::c_int,
123     }
124 
125     pub struct nlmsghdr {
126         pub nlmsg_len: u32,
127         pub nlmsg_type: u16,
128         pub nlmsg_flags: u16,
129         pub nlmsg_seq: u32,
130         pub nlmsg_pid: u32,
131     }
132 
133     pub struct nlmsgerr {
134         pub error: ::c_int,
135         pub msg: nlmsghdr,
136     }
137 
138     pub struct nl_pktinfo {
139         pub group: u32,
140     }
141 
142     pub struct nl_mmap_req {
143         pub nm_block_size: ::c_uint,
144         pub nm_block_nr: ::c_uint,
145         pub nm_frame_size: ::c_uint,
146         pub nm_frame_nr: ::c_uint,
147     }
148 
149     pub struct nl_mmap_hdr {
150         pub nm_status: ::c_uint,
151         pub nm_len: ::c_uint,
152         pub nm_group: u32,
153         pub nm_pid: u32,
154         pub nm_uid: u32,
155         pub nm_gid: u32,
156     }
157 
158     pub struct nlattr {
159         pub nla_len: u16,
160         pub nla_type: u16,
161     }
162 
163     pub struct rtentry {
164         pub rt_pad1: ::c_ulong,
165         pub rt_dst: ::sockaddr,
166         pub rt_gateway: ::sockaddr,
167         pub rt_genmask: ::sockaddr,
168         pub rt_flags: ::c_ushort,
169         pub rt_pad2: ::c_short,
170         pub rt_pad3: ::c_ulong,
171         pub rt_tos: ::c_uchar,
172         pub rt_class: ::c_uchar,
173         #[cfg(target_pointer_width = "64")]
174         pub rt_pad4: [::c_short; 3usize],
175         #[cfg(not(target_pointer_width = "64"))]
176         pub rt_pad4: ::c_short,
177         pub rt_metric: ::c_short,
178         pub rt_dev: *mut ::c_char,
179         pub rt_mtu: ::c_ulong,
180         pub rt_window: ::c_ulong,
181         pub rt_irtt: ::c_ushort,
182     }
183 }
184 
185 impl siginfo_t {
si_addr(&self) -> *mut ::c_void186     pub unsafe fn si_addr(&self) -> *mut ::c_void {
187         #[repr(C)]
188         struct siginfo_sigfault {
189             _si_signo: ::c_int,
190             _si_errno: ::c_int,
191             _si_code: ::c_int,
192             si_addr: *mut ::c_void,
193         }
194         (*(self as *const siginfo_t as *const siginfo_sigfault)).si_addr
195     }
196 
si_value(&self) -> ::sigval197     pub unsafe fn si_value(&self) -> ::sigval {
198         #[repr(C)]
199         struct siginfo_timer {
200             _si_signo: ::c_int,
201             _si_errno: ::c_int,
202             _si_code: ::c_int,
203             _si_tid: ::c_int,
204             _si_overrun: ::c_int,
205             si_sigval: ::sigval,
206         }
207         (*(self as *const siginfo_t as *const siginfo_timer)).si_sigval
208     }
209 }
210 
211 s_no_extra_traits! {
212     pub struct utmpx {
213         pub ut_type: ::c_short,
214         pub ut_pid: ::pid_t,
215         pub ut_line: [::c_char; __UT_LINESIZE],
216         pub ut_id: [::c_char; 4],
217 
218         pub ut_user: [::c_char; __UT_NAMESIZE],
219         pub ut_host: [::c_char; __UT_HOSTSIZE],
220         pub ut_exit: __exit_status,
221 
222         #[cfg(any(target_arch = "aarch64",
223                   target_arch = "s390x",
224                   all(target_pointer_width = "32",
225                       not(target_arch = "x86_64"))))]
226         pub ut_session: ::c_long,
227         #[cfg(any(target_arch = "aarch64",
228                   target_arch = "s390x",
229                   all(target_pointer_width = "32",
230                       not(target_arch = "x86_64"))))]
231         pub ut_tv: ::timeval,
232 
233         #[cfg(not(any(target_arch = "aarch64",
234                       target_arch = "s390x",
235                       all(target_pointer_width = "32",
236                           not(target_arch = "x86_64")))))]
237         pub ut_session: i32,
238         #[cfg(not(any(target_arch = "aarch64",
239                       target_arch = "s390x",
240                       all(target_pointer_width = "32",
241                           not(target_arch = "x86_64")))))]
242         pub ut_tv: __timeval,
243 
244         pub ut_addr_v6: [i32; 4],
245         __glibc_reserved: [::c_char; 20],
246     }
247 }
248 
249 cfg_if! {
250     if #[cfg(feature = "extra_traits")] {
251         impl PartialEq for utmpx {
252             fn eq(&self, other: &utmpx) -> bool {
253                 self.ut_type == other.ut_type
254                     && self.ut_pid == other.ut_pid
255                     && self.ut_line == other.ut_line
256                     && self.ut_id == other.ut_id
257                     && self.ut_user == other.ut_user
258                     && self
259                     .ut_host
260                     .iter()
261                     .zip(other.ut_host.iter())
262                     .all(|(a,b)| a == b)
263                     && self.ut_exit == other.ut_exit
264                     && self.ut_session == other.ut_session
265                     && self.ut_tv == other.ut_tv
266                     && self.ut_addr_v6 == other.ut_addr_v6
267                     && self.__glibc_reserved == other.__glibc_reserved
268             }
269         }
270 
271         impl Eq for utmpx {}
272 
273         impl ::fmt::Debug for utmpx {
274             fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
275                 f.debug_struct("utmpx")
276                     .field("ut_type", &self.ut_type)
277                     .field("ut_pid", &self.ut_pid)
278                     .field("ut_line", &self.ut_line)
279                     .field("ut_id", &self.ut_id)
280                     .field("ut_user", &self.ut_user)
281                 // FIXME: .field("ut_host", &self.ut_host)
282                     .field("ut_exit", &self.ut_exit)
283                     .field("ut_session", &self.ut_session)
284                     .field("ut_tv", &self.ut_tv)
285                     .field("ut_addr_v6", &self.ut_addr_v6)
286                     .field("__glibc_reserved", &self.__glibc_reserved)
287                     .finish()
288             }
289         }
290 
291         impl ::hash::Hash for utmpx {
292             fn hash<H: ::hash::Hasher>(&self, state: &mut H) {
293                 self.ut_type.hash(state);
294                 self.ut_pid.hash(state);
295                 self.ut_line.hash(state);
296                 self.ut_id.hash(state);
297                 self.ut_user.hash(state);
298                 self.ut_host.hash(state);
299                 self.ut_exit.hash(state);
300                 self.ut_session.hash(state);
301                 self.ut_tv.hash(state);
302                 self.ut_addr_v6.hash(state);
303                 self.__glibc_reserved.hash(state);
304             }
305         }
306     }
307 }
308 
309 pub const RLIMIT_CPU: ::__rlimit_resource_t = 0;
310 pub const RLIMIT_FSIZE: ::__rlimit_resource_t = 1;
311 pub const RLIMIT_DATA: ::__rlimit_resource_t = 2;
312 pub const RLIMIT_STACK: ::__rlimit_resource_t = 3;
313 pub const RLIMIT_CORE: ::__rlimit_resource_t = 4;
314 pub const RLIMIT_LOCKS: ::__rlimit_resource_t = 10;
315 pub const RLIMIT_SIGPENDING: ::__rlimit_resource_t = 11;
316 pub const RLIMIT_MSGQUEUE: ::__rlimit_resource_t = 12;
317 pub const RLIMIT_NICE: ::__rlimit_resource_t = 13;
318 pub const RLIMIT_RTPRIO: ::__rlimit_resource_t = 14;
319 pub const RLIMIT_RTTIME: ::__rlimit_resource_t = 15;
320 pub const RLIMIT_NLIMITS: ::__rlimit_resource_t = 16;
321 
322 pub const MS_RMT_MASK: ::c_ulong = 0x02800051;
323 
324 pub const __UT_LINESIZE: usize = 32;
325 pub const __UT_NAMESIZE: usize = 32;
326 pub const __UT_HOSTSIZE: usize = 256;
327 pub const EMPTY: ::c_short = 0;
328 pub const RUN_LVL: ::c_short = 1;
329 pub const BOOT_TIME: ::c_short = 2;
330 pub const NEW_TIME: ::c_short = 3;
331 pub const OLD_TIME: ::c_short = 4;
332 pub const INIT_PROCESS: ::c_short = 5;
333 pub const LOGIN_PROCESS: ::c_short = 6;
334 pub const USER_PROCESS: ::c_short = 7;
335 pub const DEAD_PROCESS: ::c_short = 8;
336 pub const ACCOUNTING: ::c_short = 9;
337 
338 pub const SOCK_NONBLOCK: ::c_int = O_NONBLOCK;
339 
340 pub const SOL_RXRPC: ::c_int = 272;
341 pub const SOL_PPPOL2TP: ::c_int = 273;
342 pub const SOL_PNPIPE: ::c_int = 275;
343 pub const SOL_RDS: ::c_int = 276;
344 pub const SOL_IUCV: ::c_int = 277;
345 pub const SOL_CAIF: ::c_int = 278;
346 pub const SOL_NFC: ::c_int = 280;
347 pub const SOL_XDP: ::c_int = 283;
348 
349 pub const MSG_TRYHARD: ::c_int = 4;
350 
351 pub const LC_PAPER: ::c_int = 7;
352 pub const LC_NAME: ::c_int = 8;
353 pub const LC_ADDRESS: ::c_int = 9;
354 pub const LC_TELEPHONE: ::c_int = 10;
355 pub const LC_MEASUREMENT: ::c_int = 11;
356 pub const LC_IDENTIFICATION: ::c_int = 12;
357 pub const LC_PAPER_MASK: ::c_int = (1 << LC_PAPER);
358 pub const LC_NAME_MASK: ::c_int = (1 << LC_NAME);
359 pub const LC_ADDRESS_MASK: ::c_int = (1 << LC_ADDRESS);
360 pub const LC_TELEPHONE_MASK: ::c_int = (1 << LC_TELEPHONE);
361 pub const LC_MEASUREMENT_MASK: ::c_int = (1 << LC_MEASUREMENT);
362 pub const LC_IDENTIFICATION_MASK: ::c_int = (1 << LC_IDENTIFICATION);
363 pub const LC_ALL_MASK: ::c_int = ::LC_CTYPE_MASK
364     | ::LC_NUMERIC_MASK
365     | ::LC_TIME_MASK
366     | ::LC_COLLATE_MASK
367     | ::LC_MONETARY_MASK
368     | ::LC_MESSAGES_MASK
369     | LC_PAPER_MASK
370     | LC_NAME_MASK
371     | LC_ADDRESS_MASK
372     | LC_TELEPHONE_MASK
373     | LC_MEASUREMENT_MASK
374     | LC_IDENTIFICATION_MASK;
375 
376 pub const MAP_SHARED_VALIDATE: ::c_int = 0x3;
377 pub const MAP_FIXED_NOREPLACE: ::c_int = 0x100000;
378 
379 pub const ENOTSUP: ::c_int = EOPNOTSUPP;
380 
381 pub const SOCK_SEQPACKET: ::c_int = 5;
382 pub const SOCK_DCCP: ::c_int = 6;
383 pub const SOCK_PACKET: ::c_int = 10;
384 
385 pub const TCP_COOKIE_TRANSACTIONS: ::c_int = 15;
386 pub const TCP_THIN_LINEAR_TIMEOUTS: ::c_int = 16;
387 pub const TCP_THIN_DUPACK: ::c_int = 17;
388 pub const TCP_USER_TIMEOUT: ::c_int = 18;
389 pub const TCP_REPAIR: ::c_int = 19;
390 pub const TCP_REPAIR_QUEUE: ::c_int = 20;
391 pub const TCP_QUEUE_SEQ: ::c_int = 21;
392 pub const TCP_REPAIR_OPTIONS: ::c_int = 22;
393 pub const TCP_FASTOPEN: ::c_int = 23;
394 pub const TCP_TIMESTAMP: ::c_int = 24;
395 
396 /* DCCP socket options */
397 pub const DCCP_SOCKOPT_PACKET_SIZE: ::c_int = 1;
398 pub const DCCP_SOCKOPT_SERVICE: ::c_int = 2;
399 pub const DCCP_SOCKOPT_CHANGE_L: ::c_int = 3;
400 pub const DCCP_SOCKOPT_CHANGE_R: ::c_int = 4;
401 pub const DCCP_SOCKOPT_GET_CUR_MPS: ::c_int = 5;
402 pub const DCCP_SOCKOPT_SERVER_TIMEWAIT: ::c_int = 6;
403 pub const DCCP_SOCKOPT_SEND_CSCOV: ::c_int = 10;
404 pub const DCCP_SOCKOPT_RECV_CSCOV: ::c_int = 11;
405 pub const DCCP_SOCKOPT_AVAILABLE_CCIDS: ::c_int = 12;
406 pub const DCCP_SOCKOPT_CCID: ::c_int = 13;
407 pub const DCCP_SOCKOPT_TX_CCID: ::c_int = 14;
408 pub const DCCP_SOCKOPT_RX_CCID: ::c_int = 15;
409 pub const DCCP_SOCKOPT_QPOLICY_ID: ::c_int = 16;
410 pub const DCCP_SOCKOPT_QPOLICY_TXQLEN: ::c_int = 17;
411 pub const DCCP_SOCKOPT_CCID_RX_INFO: ::c_int = 128;
412 pub const DCCP_SOCKOPT_CCID_TX_INFO: ::c_int = 192;
413 
414 /// maximum number of services provided on the same listening port
415 pub const DCCP_SERVICE_LIST_MAX_LEN: ::c_int = 32;
416 
417 pub const SIGEV_THREAD_ID: ::c_int = 4;
418 
419 pub const BUFSIZ: ::c_uint = 8192;
420 pub const TMP_MAX: ::c_uint = 238328;
421 pub const FOPEN_MAX: ::c_uint = 16;
422 pub const POSIX_MADV_DONTNEED: ::c_int = 4;
423 pub const _SC_EQUIV_CLASS_MAX: ::c_int = 41;
424 pub const _SC_CHARCLASS_NAME_MAX: ::c_int = 45;
425 pub const _SC_PII: ::c_int = 53;
426 pub const _SC_PII_XTI: ::c_int = 54;
427 pub const _SC_PII_SOCKET: ::c_int = 55;
428 pub const _SC_PII_INTERNET: ::c_int = 56;
429 pub const _SC_PII_OSI: ::c_int = 57;
430 pub const _SC_POLL: ::c_int = 58;
431 pub const _SC_SELECT: ::c_int = 59;
432 pub const _SC_PII_INTERNET_STREAM: ::c_int = 61;
433 pub const _SC_PII_INTERNET_DGRAM: ::c_int = 62;
434 pub const _SC_PII_OSI_COTS: ::c_int = 63;
435 pub const _SC_PII_OSI_CLTS: ::c_int = 64;
436 pub const _SC_PII_OSI_M: ::c_int = 65;
437 pub const _SC_T_IOV_MAX: ::c_int = 66;
438 pub const _SC_2_C_VERSION: ::c_int = 96;
439 pub const _SC_CHAR_BIT: ::c_int = 101;
440 pub const _SC_CHAR_MAX: ::c_int = 102;
441 pub const _SC_CHAR_MIN: ::c_int = 103;
442 pub const _SC_INT_MAX: ::c_int = 104;
443 pub const _SC_INT_MIN: ::c_int = 105;
444 pub const _SC_LONG_BIT: ::c_int = 106;
445 pub const _SC_WORD_BIT: ::c_int = 107;
446 pub const _SC_MB_LEN_MAX: ::c_int = 108;
447 pub const _SC_SSIZE_MAX: ::c_int = 110;
448 pub const _SC_SCHAR_MAX: ::c_int = 111;
449 pub const _SC_SCHAR_MIN: ::c_int = 112;
450 pub const _SC_SHRT_MAX: ::c_int = 113;
451 pub const _SC_SHRT_MIN: ::c_int = 114;
452 pub const _SC_UCHAR_MAX: ::c_int = 115;
453 pub const _SC_UINT_MAX: ::c_int = 116;
454 pub const _SC_ULONG_MAX: ::c_int = 117;
455 pub const _SC_USHRT_MAX: ::c_int = 118;
456 pub const _SC_NL_ARGMAX: ::c_int = 119;
457 pub const _SC_NL_LANGMAX: ::c_int = 120;
458 pub const _SC_NL_MSGMAX: ::c_int = 121;
459 pub const _SC_NL_NMAX: ::c_int = 122;
460 pub const _SC_NL_SETMAX: ::c_int = 123;
461 pub const _SC_NL_TEXTMAX: ::c_int = 124;
462 pub const _SC_BASE: ::c_int = 134;
463 pub const _SC_C_LANG_SUPPORT: ::c_int = 135;
464 pub const _SC_C_LANG_SUPPORT_R: ::c_int = 136;
465 pub const _SC_DEVICE_IO: ::c_int = 140;
466 pub const _SC_DEVICE_SPECIFIC: ::c_int = 141;
467 pub const _SC_DEVICE_SPECIFIC_R: ::c_int = 142;
468 pub const _SC_FD_MGMT: ::c_int = 143;
469 pub const _SC_FIFO: ::c_int = 144;
470 pub const _SC_PIPE: ::c_int = 145;
471 pub const _SC_FILE_ATTRIBUTES: ::c_int = 146;
472 pub const _SC_FILE_LOCKING: ::c_int = 147;
473 pub const _SC_FILE_SYSTEM: ::c_int = 148;
474 pub const _SC_MULTI_PROCESS: ::c_int = 150;
475 pub const _SC_SINGLE_PROCESS: ::c_int = 151;
476 pub const _SC_NETWORKING: ::c_int = 152;
477 pub const _SC_REGEX_VERSION: ::c_int = 156;
478 pub const _SC_SIGNALS: ::c_int = 158;
479 pub const _SC_SYSTEM_DATABASE: ::c_int = 162;
480 pub const _SC_SYSTEM_DATABASE_R: ::c_int = 163;
481 pub const _SC_USER_GROUPS: ::c_int = 166;
482 pub const _SC_USER_GROUPS_R: ::c_int = 167;
483 pub const _SC_LEVEL1_ICACHE_SIZE: ::c_int = 185;
484 pub const _SC_LEVEL1_ICACHE_ASSOC: ::c_int = 186;
485 pub const _SC_LEVEL1_ICACHE_LINESIZE: ::c_int = 187;
486 pub const _SC_LEVEL1_DCACHE_SIZE: ::c_int = 188;
487 pub const _SC_LEVEL1_DCACHE_ASSOC: ::c_int = 189;
488 pub const _SC_LEVEL1_DCACHE_LINESIZE: ::c_int = 190;
489 pub const _SC_LEVEL2_CACHE_SIZE: ::c_int = 191;
490 pub const _SC_LEVEL2_CACHE_ASSOC: ::c_int = 192;
491 pub const _SC_LEVEL2_CACHE_LINESIZE: ::c_int = 193;
492 pub const _SC_LEVEL3_CACHE_SIZE: ::c_int = 194;
493 pub const _SC_LEVEL3_CACHE_ASSOC: ::c_int = 195;
494 pub const _SC_LEVEL3_CACHE_LINESIZE: ::c_int = 196;
495 pub const _SC_LEVEL4_CACHE_SIZE: ::c_int = 197;
496 pub const _SC_LEVEL4_CACHE_ASSOC: ::c_int = 198;
497 pub const _SC_LEVEL4_CACHE_LINESIZE: ::c_int = 199;
498 pub const O_ACCMODE: ::c_int = 3;
499 pub const ST_RELATIME: ::c_ulong = 4096;
500 pub const NI_MAXHOST: ::socklen_t = 1025;
501 
502 pub const ADFS_SUPER_MAGIC: ::c_long = 0x0000adf5;
503 pub const AFFS_SUPER_MAGIC: ::c_long = 0x0000adff;
504 pub const CODA_SUPER_MAGIC: ::c_long = 0x73757245;
505 pub const CRAMFS_MAGIC: ::c_long = 0x28cd3d45;
506 pub const EFS_SUPER_MAGIC: ::c_long = 0x00414a53;
507 pub const EXT2_SUPER_MAGIC: ::c_long = 0x0000ef53;
508 pub const EXT3_SUPER_MAGIC: ::c_long = 0x0000ef53;
509 pub const EXT4_SUPER_MAGIC: ::c_long = 0x0000ef53;
510 pub const HPFS_SUPER_MAGIC: ::c_long = 0xf995e849;
511 pub const HUGETLBFS_MAGIC: ::c_long = 0x958458f6;
512 pub const ISOFS_SUPER_MAGIC: ::c_long = 0x00009660;
513 pub const JFFS2_SUPER_MAGIC: ::c_long = 0x000072b6;
514 pub const MINIX_SUPER_MAGIC: ::c_long = 0x0000137f;
515 pub const MINIX_SUPER_MAGIC2: ::c_long = 0x0000138f;
516 pub const MINIX2_SUPER_MAGIC: ::c_long = 0x00002468;
517 pub const MINIX2_SUPER_MAGIC2: ::c_long = 0x00002478;
518 pub const MSDOS_SUPER_MAGIC: ::c_long = 0x00004d44;
519 pub const NCP_SUPER_MAGIC: ::c_long = 0x0000564c;
520 pub const NFS_SUPER_MAGIC: ::c_long = 0x00006969;
521 pub const OPENPROM_SUPER_MAGIC: ::c_long = 0x00009fa1;
522 pub const PROC_SUPER_MAGIC: ::c_long = 0x00009fa0;
523 pub const QNX4_SUPER_MAGIC: ::c_long = 0x0000002f;
524 pub const REISERFS_SUPER_MAGIC: ::c_long = 0x52654973;
525 pub const SMB_SUPER_MAGIC: ::c_long = 0x0000517b;
526 pub const TMPFS_MAGIC: ::c_long = 0x01021994;
527 pub const USBDEVICE_SUPER_MAGIC: ::c_long = 0x00009fa2;
528 
529 pub const CPU_SETSIZE: ::c_int = 0x400;
530 
531 pub const PTRACE_TRACEME: ::c_uint = 0;
532 pub const PTRACE_PEEKTEXT: ::c_uint = 1;
533 pub const PTRACE_PEEKDATA: ::c_uint = 2;
534 pub const PTRACE_PEEKUSER: ::c_uint = 3;
535 pub const PTRACE_POKETEXT: ::c_uint = 4;
536 pub const PTRACE_POKEDATA: ::c_uint = 5;
537 pub const PTRACE_POKEUSER: ::c_uint = 6;
538 pub const PTRACE_CONT: ::c_uint = 7;
539 pub const PTRACE_KILL: ::c_uint = 8;
540 pub const PTRACE_SINGLESTEP: ::c_uint = 9;
541 pub const PTRACE_ATTACH: ::c_uint = 16;
542 pub const PTRACE_SYSCALL: ::c_uint = 24;
543 pub const PTRACE_SETOPTIONS: ::c_uint = 0x4200;
544 pub const PTRACE_GETEVENTMSG: ::c_uint = 0x4201;
545 pub const PTRACE_GETSIGINFO: ::c_uint = 0x4202;
546 pub const PTRACE_SETSIGINFO: ::c_uint = 0x4203;
547 pub const PTRACE_GETREGSET: ::c_uint = 0x4204;
548 pub const PTRACE_SETREGSET: ::c_uint = 0x4205;
549 pub const PTRACE_SEIZE: ::c_uint = 0x4206;
550 pub const PTRACE_INTERRUPT: ::c_uint = 0x4207;
551 pub const PTRACE_LISTEN: ::c_uint = 0x4208;
552 pub const PTRACE_PEEKSIGINFO: ::c_uint = 0x4209;
553 
554 pub const EPOLLWAKEUP: ::c_int = 0x20000000;
555 
556 pub const SEEK_DATA: ::c_int = 3;
557 pub const SEEK_HOLE: ::c_int = 4;
558 
559 pub const LINUX_REBOOT_MAGIC1: ::c_int = 0xfee1dead;
560 pub const LINUX_REBOOT_MAGIC2: ::c_int = 672274793;
561 pub const LINUX_REBOOT_MAGIC2A: ::c_int = 85072278;
562 pub const LINUX_REBOOT_MAGIC2B: ::c_int = 369367448;
563 pub const LINUX_REBOOT_MAGIC2C: ::c_int = 537993216;
564 
565 pub const LINUX_REBOOT_CMD_RESTART: ::c_int = 0x01234567;
566 pub const LINUX_REBOOT_CMD_HALT: ::c_int = 0xCDEF0123;
567 pub const LINUX_REBOOT_CMD_CAD_ON: ::c_int = 0x89ABCDEF;
568 pub const LINUX_REBOOT_CMD_CAD_OFF: ::c_int = 0x00000000;
569 pub const LINUX_REBOOT_CMD_POWER_OFF: ::c_int = 0x4321FEDC;
570 pub const LINUX_REBOOT_CMD_RESTART2: ::c_int = 0xA1B2C3D4;
571 pub const LINUX_REBOOT_CMD_SW_SUSPEND: ::c_int = 0xD000FCE2;
572 pub const LINUX_REBOOT_CMD_KEXEC: ::c_int = 0x45584543;
573 
574 // linux/rtnetlink.h
575 pub const TCA_PAD: ::c_ushort = 9;
576 pub const TCA_DUMP_INVISIBLE: ::c_ushort = 10;
577 pub const TCA_CHAIN: ::c_ushort = 11;
578 pub const TCA_HW_OFFLOAD: ::c_ushort = 12;
579 
580 pub const RTM_DELNETCONF: u16 = 81;
581 pub const RTM_NEWSTATS: u16 = 92;
582 pub const RTM_GETSTATS: u16 = 94;
583 pub const RTM_NEWCACHEREPORT: u16 = 96;
584 
585 pub const RTM_F_LOOKUP_TABLE: ::c_uint = 0x1000;
586 pub const RTM_F_FIB_MATCH: ::c_uint = 0x2000;
587 
588 pub const RTA_VIA: ::c_ushort = 18;
589 pub const RTA_NEWDST: ::c_ushort = 19;
590 pub const RTA_PREF: ::c_ushort = 20;
591 pub const RTA_ENCAP_TYPE: ::c_ushort = 21;
592 pub const RTA_ENCAP: ::c_ushort = 22;
593 pub const RTA_EXPIRES: ::c_ushort = 23;
594 pub const RTA_PAD: ::c_ushort = 24;
595 pub const RTA_UID: ::c_ushort = 25;
596 pub const RTA_TTL_PROPAGATE: ::c_ushort = 26;
597 
598 // linux/neighbor.h
599 pub const NTF_EXT_LEARNED: u8 = 0x10;
600 pub const NTF_OFFLOADED: u8 = 0x20;
601 
602 pub const NDA_MASTER: ::c_ushort = 9;
603 pub const NDA_LINK_NETNSID: ::c_ushort = 10;
604 pub const NDA_SRC_VNI: ::c_ushort = 11;
605 
606 // linux/if_addr.h
607 pub const IFA_FLAGS: ::c_ushort = 8;
608 
609 pub const IFA_F_MANAGETEMPADDR: u32 = 0x100;
610 pub const IFA_F_NOPREFIXROUTE: u32 = 0x200;
611 pub const IFA_F_MCAUTOJOIN: u32 = 0x400;
612 pub const IFA_F_STABLE_PRIVACY: u32 = 0x800;
613 
614 pub const MAX_LINKS: ::c_int = 32;
615 
616 pub const GENL_UNS_ADMIN_PERM: ::c_int = 0x10;
617 
618 pub const GENL_ID_VFS_DQUOT: ::c_int = ::NLMSG_MIN_TYPE + 1;
619 pub const GENL_ID_PMCRAID: ::c_int = ::NLMSG_MIN_TYPE + 2;
620 
621 pub const TIOCM_LE: ::c_int = 0x001;
622 pub const TIOCM_DTR: ::c_int = 0x002;
623 pub const TIOCM_RTS: ::c_int = 0x004;
624 pub const TIOCM_CD: ::c_int = TIOCM_CAR;
625 pub const TIOCM_RI: ::c_int = TIOCM_RNG;
626 
627 pub const NF_NETDEV_INGRESS: ::c_int = 0;
628 pub const NF_NETDEV_NUMHOOKS: ::c_int = 1;
629 
630 pub const NFPROTO_INET: ::c_int = 1;
631 pub const NFPROTO_NETDEV: ::c_int = 5;
632 
633 // linux/netfilter/nf_tables.h
634 pub const NFT_TABLE_MAXNAMELEN: ::c_int = 256;
635 pub const NFT_CHAIN_MAXNAMELEN: ::c_int = 256;
636 pub const NFT_SET_MAXNAMELEN: ::c_int = 256;
637 pub const NFT_OBJ_MAXNAMELEN: ::c_int = 256;
638 pub const NFT_USERDATA_MAXLEN: ::c_int = 256;
639 
640 pub const NFT_REG_VERDICT: ::c_int = 0;
641 pub const NFT_REG_1: ::c_int = 1;
642 pub const NFT_REG_2: ::c_int = 2;
643 pub const NFT_REG_3: ::c_int = 3;
644 pub const NFT_REG_4: ::c_int = 4;
645 pub const __NFT_REG_MAX: ::c_int = 5;
646 pub const NFT_REG32_00: ::c_int = 8;
647 pub const NFT_REG32_01: ::c_int = 9;
648 pub const NFT_REG32_02: ::c_int = 10;
649 pub const NFT_REG32_03: ::c_int = 11;
650 pub const NFT_REG32_04: ::c_int = 12;
651 pub const NFT_REG32_05: ::c_int = 13;
652 pub const NFT_REG32_06: ::c_int = 14;
653 pub const NFT_REG32_07: ::c_int = 15;
654 pub const NFT_REG32_08: ::c_int = 16;
655 pub const NFT_REG32_09: ::c_int = 17;
656 pub const NFT_REG32_10: ::c_int = 18;
657 pub const NFT_REG32_11: ::c_int = 19;
658 pub const NFT_REG32_12: ::c_int = 20;
659 pub const NFT_REG32_13: ::c_int = 21;
660 pub const NFT_REG32_14: ::c_int = 22;
661 pub const NFT_REG32_15: ::c_int = 23;
662 
663 pub const NFT_REG_SIZE: ::c_int = 16;
664 pub const NFT_REG32_SIZE: ::c_int = 4;
665 
666 pub const NFT_CONTINUE: ::c_int = -1;
667 pub const NFT_BREAK: ::c_int = -2;
668 pub const NFT_JUMP: ::c_int = -3;
669 pub const NFT_GOTO: ::c_int = -4;
670 pub const NFT_RETURN: ::c_int = -5;
671 
672 pub const NFT_MSG_NEWTABLE: ::c_int = 0;
673 pub const NFT_MSG_GETTABLE: ::c_int = 1;
674 pub const NFT_MSG_DELTABLE: ::c_int = 2;
675 pub const NFT_MSG_NEWCHAIN: ::c_int = 3;
676 pub const NFT_MSG_GETCHAIN: ::c_int = 4;
677 pub const NFT_MSG_DELCHAIN: ::c_int = 5;
678 pub const NFT_MSG_NEWRULE: ::c_int = 6;
679 pub const NFT_MSG_GETRULE: ::c_int = 7;
680 pub const NFT_MSG_DELRULE: ::c_int = 8;
681 pub const NFT_MSG_NEWSET: ::c_int = 9;
682 pub const NFT_MSG_GETSET: ::c_int = 10;
683 pub const NFT_MSG_DELSET: ::c_int = 11;
684 pub const NFT_MSG_NEWSETELEM: ::c_int = 12;
685 pub const NFT_MSG_GETSETELEM: ::c_int = 13;
686 pub const NFT_MSG_DELSETELEM: ::c_int = 14;
687 pub const NFT_MSG_NEWGEN: ::c_int = 15;
688 pub const NFT_MSG_GETGEN: ::c_int = 16;
689 pub const NFT_MSG_TRACE: ::c_int = 17;
690 cfg_if! {
691     if #[cfg(not(target_arch = "sparc64"))] {
692         pub const NFT_MSG_NEWOBJ: ::c_int = 18;
693         pub const NFT_MSG_GETOBJ: ::c_int = 19;
694         pub const NFT_MSG_DELOBJ: ::c_int = 20;
695         pub const NFT_MSG_GETOBJ_RESET: ::c_int = 21;
696     }
697 }
698 pub const NFT_MSG_MAX: ::c_int = 25;
699 
700 pub const NFT_SET_ANONYMOUS: ::c_int = 0x1;
701 pub const NFT_SET_CONSTANT: ::c_int = 0x2;
702 pub const NFT_SET_INTERVAL: ::c_int = 0x4;
703 pub const NFT_SET_MAP: ::c_int = 0x8;
704 pub const NFT_SET_TIMEOUT: ::c_int = 0x10;
705 pub const NFT_SET_EVAL: ::c_int = 0x20;
706 
707 pub const NFT_SET_POL_PERFORMANCE: ::c_int = 0;
708 pub const NFT_SET_POL_MEMORY: ::c_int = 1;
709 
710 pub const NFT_SET_ELEM_INTERVAL_END: ::c_int = 0x1;
711 
712 pub const NFT_DATA_VALUE: ::c_uint = 0;
713 pub const NFT_DATA_VERDICT: ::c_uint = 0xffffff00;
714 
715 pub const NFT_DATA_RESERVED_MASK: ::c_uint = 0xffffff00;
716 
717 pub const NFT_DATA_VALUE_MAXLEN: ::c_int = 64;
718 
719 pub const NFT_BYTEORDER_NTOH: ::c_int = 0;
720 pub const NFT_BYTEORDER_HTON: ::c_int = 1;
721 
722 pub const NFT_CMP_EQ: ::c_int = 0;
723 pub const NFT_CMP_NEQ: ::c_int = 1;
724 pub const NFT_CMP_LT: ::c_int = 2;
725 pub const NFT_CMP_LTE: ::c_int = 3;
726 pub const NFT_CMP_GT: ::c_int = 4;
727 pub const NFT_CMP_GTE: ::c_int = 5;
728 
729 pub const NFT_RANGE_EQ: ::c_int = 0;
730 pub const NFT_RANGE_NEQ: ::c_int = 1;
731 
732 pub const NFT_LOOKUP_F_INV: ::c_int = (1 << 0);
733 
734 pub const NFT_DYNSET_OP_ADD: ::c_int = 0;
735 pub const NFT_DYNSET_OP_UPDATE: ::c_int = 1;
736 
737 pub const NFT_DYNSET_F_INV: ::c_int = (1 << 0);
738 
739 pub const NFT_PAYLOAD_LL_HEADER: ::c_int = 0;
740 pub const NFT_PAYLOAD_NETWORK_HEADER: ::c_int = 1;
741 pub const NFT_PAYLOAD_TRANSPORT_HEADER: ::c_int = 2;
742 
743 pub const NFT_PAYLOAD_CSUM_NONE: ::c_int = 0;
744 pub const NFT_PAYLOAD_CSUM_INET: ::c_int = 1;
745 
746 pub const NFT_META_LEN: ::c_int = 0;
747 pub const NFT_META_PROTOCOL: ::c_int = 1;
748 pub const NFT_META_PRIORITY: ::c_int = 2;
749 pub const NFT_META_MARK: ::c_int = 3;
750 pub const NFT_META_IIF: ::c_int = 4;
751 pub const NFT_META_OIF: ::c_int = 5;
752 pub const NFT_META_IIFNAME: ::c_int = 6;
753 pub const NFT_META_OIFNAME: ::c_int = 7;
754 pub const NFT_META_IIFTYPE: ::c_int = 8;
755 pub const NFT_META_OIFTYPE: ::c_int = 9;
756 pub const NFT_META_SKUID: ::c_int = 10;
757 pub const NFT_META_SKGID: ::c_int = 11;
758 pub const NFT_META_NFTRACE: ::c_int = 12;
759 pub const NFT_META_RTCLASSID: ::c_int = 13;
760 pub const NFT_META_SECMARK: ::c_int = 14;
761 pub const NFT_META_NFPROTO: ::c_int = 15;
762 pub const NFT_META_L4PROTO: ::c_int = 16;
763 pub const NFT_META_BRI_IIFNAME: ::c_int = 17;
764 pub const NFT_META_BRI_OIFNAME: ::c_int = 18;
765 pub const NFT_META_PKTTYPE: ::c_int = 19;
766 pub const NFT_META_CPU: ::c_int = 20;
767 pub const NFT_META_IIFGROUP: ::c_int = 21;
768 pub const NFT_META_OIFGROUP: ::c_int = 22;
769 pub const NFT_META_CGROUP: ::c_int = 23;
770 pub const NFT_META_PRANDOM: ::c_int = 24;
771 
772 pub const NFT_CT_STATE: ::c_int = 0;
773 pub const NFT_CT_DIRECTION: ::c_int = 1;
774 pub const NFT_CT_STATUS: ::c_int = 2;
775 pub const NFT_CT_MARK: ::c_int = 3;
776 pub const NFT_CT_SECMARK: ::c_int = 4;
777 pub const NFT_CT_EXPIRATION: ::c_int = 5;
778 pub const NFT_CT_HELPER: ::c_int = 6;
779 pub const NFT_CT_L3PROTOCOL: ::c_int = 7;
780 pub const NFT_CT_SRC: ::c_int = 8;
781 pub const NFT_CT_DST: ::c_int = 9;
782 pub const NFT_CT_PROTOCOL: ::c_int = 10;
783 pub const NFT_CT_PROTO_SRC: ::c_int = 11;
784 pub const NFT_CT_PROTO_DST: ::c_int = 12;
785 pub const NFT_CT_LABELS: ::c_int = 13;
786 pub const NFT_CT_PKTS: ::c_int = 14;
787 pub const NFT_CT_BYTES: ::c_int = 15;
788 
789 pub const NFT_LIMIT_PKTS: ::c_int = 0;
790 pub const NFT_LIMIT_PKT_BYTES: ::c_int = 1;
791 
792 pub const NFT_LIMIT_F_INV: ::c_int = (1 << 0);
793 
794 pub const NFT_QUEUE_FLAG_BYPASS: ::c_int = 0x01;
795 pub const NFT_QUEUE_FLAG_CPU_FANOUT: ::c_int = 0x02;
796 pub const NFT_QUEUE_FLAG_MASK: ::c_int = 0x03;
797 
798 pub const NFT_QUOTA_F_INV: ::c_int = (1 << 0);
799 
800 pub const NFT_REJECT_ICMP_UNREACH: ::c_int = 0;
801 pub const NFT_REJECT_TCP_RST: ::c_int = 1;
802 pub const NFT_REJECT_ICMPX_UNREACH: ::c_int = 2;
803 
804 pub const NFT_REJECT_ICMPX_NO_ROUTE: ::c_int = 0;
805 pub const NFT_REJECT_ICMPX_PORT_UNREACH: ::c_int = 1;
806 pub const NFT_REJECT_ICMPX_HOST_UNREACH: ::c_int = 2;
807 pub const NFT_REJECT_ICMPX_ADMIN_PROHIBITED: ::c_int = 3;
808 
809 pub const NFT_NAT_SNAT: ::c_int = 0;
810 pub const NFT_NAT_DNAT: ::c_int = 1;
811 
812 pub const NFT_TRACETYPE_UNSPEC: ::c_int = 0;
813 pub const NFT_TRACETYPE_POLICY: ::c_int = 1;
814 pub const NFT_TRACETYPE_RETURN: ::c_int = 2;
815 pub const NFT_TRACETYPE_RULE: ::c_int = 3;
816 
817 pub const NFT_NG_INCREMENTAL: ::c_int = 0;
818 pub const NFT_NG_RANDOM: ::c_int = 1;
819 
820 pub const M_MXFAST: ::c_int = 1;
821 pub const M_NLBLKS: ::c_int = 2;
822 pub const M_GRAIN: ::c_int = 3;
823 pub const M_KEEP: ::c_int = 4;
824 pub const M_TRIM_THRESHOLD: ::c_int = -1;
825 pub const M_TOP_PAD: ::c_int = -2;
826 pub const M_MMAP_THRESHOLD: ::c_int = -3;
827 pub const M_MMAP_MAX: ::c_int = -4;
828 pub const M_CHECK_ACTION: ::c_int = -5;
829 pub const M_PERTURB: ::c_int = -6;
830 pub const M_ARENA_TEST: ::c_int = -7;
831 pub const M_ARENA_MAX: ::c_int = -8;
832 
833 pub const AT_STATX_SYNC_TYPE: ::c_int = 0x6000;
834 pub const AT_STATX_SYNC_AS_STAT: ::c_int = 0x0000;
835 pub const AT_STATX_FORCE_SYNC: ::c_int = 0x2000;
836 pub const AT_STATX_DONT_SYNC: ::c_int = 0x4000;
837 pub const STATX_TYPE: ::c_uint = 0x0001;
838 pub const STATX_MODE: ::c_uint = 0x0002;
839 pub const STATX_NLINK: ::c_uint = 0x0004;
840 pub const STATX_UID: ::c_uint = 0x0008;
841 pub const STATX_GID: ::c_uint = 0x0010;
842 pub const STATX_ATIME: ::c_uint = 0x0020;
843 pub const STATX_MTIME: ::c_uint = 0x0040;
844 pub const STATX_CTIME: ::c_uint = 0x0080;
845 pub const STATX_INO: ::c_uint = 0x0100;
846 pub const STATX_SIZE: ::c_uint = 0x0200;
847 pub const STATX_BLOCKS: ::c_uint = 0x0400;
848 pub const STATX_BASIC_STATS: ::c_uint = 0x07ff;
849 pub const STATX_BTIME: ::c_uint = 0x0800;
850 pub const STATX_ALL: ::c_uint = 0x0fff;
851 pub const STATX__RESERVED: ::c_int = 0x80000000;
852 pub const STATX_ATTR_COMPRESSED: ::c_int = 0x0004;
853 pub const STATX_ATTR_IMMUTABLE: ::c_int = 0x0010;
854 pub const STATX_ATTR_APPEND: ::c_int = 0x0020;
855 pub const STATX_ATTR_NODUMP: ::c_int = 0x0040;
856 pub const STATX_ATTR_ENCRYPTED: ::c_int = 0x0800;
857 pub const STATX_ATTR_AUTOMOUNT: ::c_int = 0x1000;
858 
859 cfg_if! {
860     if #[cfg(any(
861         target_arch = "arm",
862         target_arch = "x86",
863         target_arch = "x86_64",
864         target_arch = "s390x"
865     ))] {
866         pub const PTHREAD_STACK_MIN: ::size_t = 16384;
867     } else if #[cfg(target_arch = "sparc64")] {
868         pub const PTHREAD_STACK_MIN: ::size_t = 0x6000;
869     } else {
870         pub const PTHREAD_STACK_MIN: ::size_t = 131072;
871     }
872 }
873 pub const PTHREAD_MUTEX_ADAPTIVE_NP: ::c_int = 3;
874 
875 extern "C" {
sendmmsg( sockfd: ::c_int, msgvec: *mut ::mmsghdr, vlen: ::c_uint, flags: ::c_int, ) -> ::c_int876     pub fn sendmmsg(
877         sockfd: ::c_int,
878         msgvec: *mut ::mmsghdr,
879         vlen: ::c_uint,
880         flags: ::c_int,
881     ) -> ::c_int;
recvmmsg( sockfd: ::c_int, msgvec: *mut ::mmsghdr, vlen: ::c_uint, flags: ::c_int, timeout: *mut ::timespec, ) -> ::c_int882     pub fn recvmmsg(
883         sockfd: ::c_int,
884         msgvec: *mut ::mmsghdr,
885         vlen: ::c_uint,
886         flags: ::c_int,
887         timeout: *mut ::timespec,
888     ) -> ::c_int;
889 
getrlimit64( resource: ::__rlimit_resource_t, rlim: *mut ::rlimit64, ) -> ::c_int890     pub fn getrlimit64(
891         resource: ::__rlimit_resource_t,
892         rlim: *mut ::rlimit64,
893     ) -> ::c_int;
setrlimit64( resource: ::__rlimit_resource_t, rlim: *const ::rlimit64, ) -> ::c_int894     pub fn setrlimit64(
895         resource: ::__rlimit_resource_t,
896         rlim: *const ::rlimit64,
897     ) -> ::c_int;
getrlimit( resource: ::__rlimit_resource_t, rlim: *mut ::rlimit, ) -> ::c_int898     pub fn getrlimit(
899         resource: ::__rlimit_resource_t,
900         rlim: *mut ::rlimit,
901     ) -> ::c_int;
setrlimit( resource: ::__rlimit_resource_t, rlim: *const ::rlimit, ) -> ::c_int902     pub fn setrlimit(
903         resource: ::__rlimit_resource_t,
904         rlim: *const ::rlimit,
905     ) -> ::c_int;
prlimit( pid: ::pid_t, resource: ::__rlimit_resource_t, new_limit: *const ::rlimit, old_limit: *mut ::rlimit, ) -> ::c_int906     pub fn prlimit(
907         pid: ::pid_t,
908         resource: ::__rlimit_resource_t,
909         new_limit: *const ::rlimit,
910         old_limit: *mut ::rlimit,
911     ) -> ::c_int;
prlimit64( pid: ::pid_t, resource: ::__rlimit_resource_t, new_limit: *const ::rlimit64, old_limit: *mut ::rlimit64, ) -> ::c_int912     pub fn prlimit64(
913         pid: ::pid_t,
914         resource: ::__rlimit_resource_t,
915         new_limit: *const ::rlimit64,
916         old_limit: *mut ::rlimit64,
917     ) -> ::c_int;
utmpname(file: *const ::c_char) -> ::c_int918     pub fn utmpname(file: *const ::c_char) -> ::c_int;
utmpxname(file: *const ::c_char) -> ::c_int919     pub fn utmpxname(file: *const ::c_char) -> ::c_int;
getutxent() -> *mut utmpx920     pub fn getutxent() -> *mut utmpx;
getutxid(ut: *const utmpx) -> *mut utmpx921     pub fn getutxid(ut: *const utmpx) -> *mut utmpx;
getutxline(ut: *const utmpx) -> *mut utmpx922     pub fn getutxline(ut: *const utmpx) -> *mut utmpx;
pututxline(ut: *const utmpx) -> *mut utmpx923     pub fn pututxline(ut: *const utmpx) -> *mut utmpx;
setutxent()924     pub fn setutxent();
endutxent()925     pub fn endutxent();
getpt() -> ::c_int926     pub fn getpt() -> ::c_int;
mallopt(param: ::c_int, value: ::c_int) -> ::c_int927     pub fn mallopt(param: ::c_int, value: ::c_int) -> ::c_int;
gettimeofday(tp: *mut ::timeval, tz: *mut ::timezone) -> ::c_int928     pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::timezone) -> ::c_int;
statx( dirfd: ::c_int, pathname: *const c_char, flags: ::c_int, mask: ::c_uint, statxbuf: *mut statx, ) -> ::c_int929     pub fn statx(
930         dirfd: ::c_int,
931         pathname: *const c_char,
932         flags: ::c_int,
933         mask: ::c_uint,
934         statxbuf: *mut statx,
935     ) -> ::c_int;
getrandom( buf: *mut ::c_void, buflen: ::size_t, flags: ::c_uint, ) -> ::ssize_t936     pub fn getrandom(
937         buf: *mut ::c_void,
938         buflen: ::size_t,
939         flags: ::c_uint,
940     ) -> ::ssize_t;
941 }
942 
943 #[link(name = "util")]
944 extern "C" {
ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int945     pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
backtrace(buf: *mut *mut ::c_void, sz: ::c_int) -> ::c_int946     pub fn backtrace(buf: *mut *mut ::c_void, sz: ::c_int) -> ::c_int;
glob64( pattern: *const ::c_char, flags: ::c_int, errfunc: ::Option< extern "C" fn(epath: *const ::c_char, errno: ::c_int) -> ::c_int, >, pglob: *mut glob64_t, ) -> ::c_int947     pub fn glob64(
948         pattern: *const ::c_char,
949         flags: ::c_int,
950         errfunc: ::Option<
951             extern "C" fn(epath: *const ::c_char, errno: ::c_int) -> ::c_int,
952         >,
953         pglob: *mut glob64_t,
954     ) -> ::c_int;
globfree64(pglob: *mut glob64_t)955     pub fn globfree64(pglob: *mut glob64_t);
ptrace(request: ::c_uint, ...) -> ::c_long956     pub fn ptrace(request: ::c_uint, ...) -> ::c_long;
pthread_attr_getaffinity_np( attr: *const ::pthread_attr_t, cpusetsize: ::size_t, cpuset: *mut ::cpu_set_t, ) -> ::c_int957     pub fn pthread_attr_getaffinity_np(
958         attr: *const ::pthread_attr_t,
959         cpusetsize: ::size_t,
960         cpuset: *mut ::cpu_set_t,
961     ) -> ::c_int;
pthread_attr_setaffinity_np( attr: *mut ::pthread_attr_t, cpusetsize: ::size_t, cpuset: *const ::cpu_set_t, ) -> ::c_int962     pub fn pthread_attr_setaffinity_np(
963         attr: *mut ::pthread_attr_t,
964         cpusetsize: ::size_t,
965         cpuset: *const ::cpu_set_t,
966     ) -> ::c_int;
getpriority(which: ::__priority_which_t, who: ::id_t) -> ::c_int967     pub fn getpriority(which: ::__priority_which_t, who: ::id_t) -> ::c_int;
setpriority( which: ::__priority_which_t, who: ::id_t, prio: ::c_int, ) -> ::c_int968     pub fn setpriority(
969         which: ::__priority_which_t,
970         who: ::id_t,
971         prio: ::c_int,
972     ) -> ::c_int;
pthread_getaffinity_np( thread: ::pthread_t, cpusetsize: ::size_t, cpuset: *mut ::cpu_set_t, ) -> ::c_int973     pub fn pthread_getaffinity_np(
974         thread: ::pthread_t,
975         cpusetsize: ::size_t,
976         cpuset: *mut ::cpu_set_t,
977     ) -> ::c_int;
pthread_setaffinity_np( thread: ::pthread_t, cpusetsize: ::size_t, cpuset: *const ::cpu_set_t, ) -> ::c_int978     pub fn pthread_setaffinity_np(
979         thread: ::pthread_t,
980         cpusetsize: ::size_t,
981         cpuset: *const ::cpu_set_t,
982     ) -> ::c_int;
pthread_rwlockattr_getkind_np( attr: *const ::pthread_rwlockattr_t, val: *mut ::c_int, ) -> ::c_int983     pub fn pthread_rwlockattr_getkind_np(
984         attr: *const ::pthread_rwlockattr_t,
985         val: *mut ::c_int,
986     ) -> ::c_int;
pthread_rwlockattr_setkind_np( attr: *mut ::pthread_rwlockattr_t, val: ::c_int, ) -> ::c_int987     pub fn pthread_rwlockattr_setkind_np(
988         attr: *mut ::pthread_rwlockattr_t,
989         val: ::c_int,
990     ) -> ::c_int;
sched_getcpu() -> ::c_int991     pub fn sched_getcpu() -> ::c_int;
mallinfo() -> ::mallinfo992     pub fn mallinfo() -> ::mallinfo;
malloc_usable_size(ptr: *mut ::c_void) -> ::size_t993     pub fn malloc_usable_size(ptr: *mut ::c_void) -> ::size_t;
getauxval(type_: ::c_ulong) -> ::c_ulong994     pub fn getauxval(type_: ::c_ulong) -> ::c_ulong;
995     #[cfg_attr(target_os = "netbsd", link_name = "__getpwent_r50")]
996     #[cfg_attr(target_os = "solaris", link_name = "__posix_getpwent_r")]
getpwent_r( pwd: *mut ::passwd, buf: *mut ::c_char, buflen: ::size_t, result: *mut *mut ::passwd, ) -> ::c_int997     pub fn getpwent_r(
998         pwd: *mut ::passwd,
999         buf: *mut ::c_char,
1000         buflen: ::size_t,
1001         result: *mut *mut ::passwd,
1002     ) -> ::c_int;
1003     #[cfg_attr(target_os = "netbsd", link_name = "__getgrent_r50")]
1004     #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrent_r")]
getgrent_r( grp: *mut ::group, buf: *mut ::c_char, buflen: ::size_t, result: *mut *mut ::group, ) -> ::c_int1005     pub fn getgrent_r(
1006         grp: *mut ::group,
1007         buf: *mut ::c_char,
1008         buflen: ::size_t,
1009         result: *mut *mut ::group,
1010     ) -> ::c_int;
pthread_getname_np( thread: ::pthread_t, name: *mut ::c_char, len: ::size_t, ) -> ::c_int1011     pub fn pthread_getname_np(
1012         thread: ::pthread_t,
1013         name: *mut ::c_char,
1014         len: ::size_t,
1015     ) -> ::c_int;
pthread_setname_np( thread: ::pthread_t, name: *const ::c_char, ) -> ::c_int1016     pub fn pthread_setname_np(
1017         thread: ::pthread_t,
1018         name: *const ::c_char,
1019     ) -> ::c_int;
1020 }
1021 
1022 cfg_if! {
1023     if #[cfg(any(target_arch = "x86",
1024                  target_arch = "arm",
1025                  target_arch = "mips",
1026                  target_arch = "powerpc"))] {
1027         mod b32;
1028         pub use self::b32::*;
1029     } else if #[cfg(any(target_arch = "x86_64",
1030                         target_arch = "aarch64",
1031                         target_arch = "powerpc64",
1032                         target_arch = "mips64",
1033                         target_arch = "s390x",
1034                         target_arch = "sparc64"))] {
1035         mod b64;
1036         pub use self::b64::*;
1037     } else {
1038         // Unknown target_arch
1039     }
1040 }
1041 
1042 cfg_if! {
1043     if #[cfg(libc_align)] {
1044         mod align;
1045         pub use self::align::*;
1046     } else {
1047         mod no_align;
1048         pub use self::no_align::*;
1049     }
1050 }
1051