]> git.proxmox.com Git - rustc.git/blob - vendor/linux-raw-sys/src/lib.rs
New upstream version 1.73.0+dfsg1
[rustc.git] / vendor / linux-raw-sys / src / lib.rs
1 #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
2 #![cfg_attr(not(feature = "std"), no_std)]
3
4 #[cfg(feature = "std")]
5 pub use std::os::raw as ctypes;
6
7 #[cfg(all(not(feature = "std"), feature = "no_std"))]
8 pub mod ctypes {
9 // The signedness of `char` is platform-specific, however a consequence
10 // of it being platform-specific is that any code which depends on the
11 // signedness of `char` is already non-portable. So we can just use `u8`
12 // here and no portable code will notice.
13 pub type c_char = u8;
14
15 // The following assumes that Linux is always either ILP32 or LP64,
16 // and char is always 8-bit.
17 //
18 // In theory, `c_long` and `c_ulong` could be `isize` and `usize`
19 // respectively, however in practice Linux doesn't use them in that way
20 // consistently. So stick with the convention followed by `libc` and
21 // others and use the fixed-width types.
22 pub type c_schar = i8;
23 pub type c_uchar = u8;
24 pub type c_short = i16;
25 pub type c_ushort = u16;
26 pub type c_int = i32;
27 pub type c_uint = u32;
28 #[cfg(target_pointer_width = "32")]
29 pub type c_long = i32;
30 #[cfg(target_pointer_width = "32")]
31 pub type c_ulong = u32;
32 #[cfg(target_pointer_width = "64")]
33 pub type c_long = i64;
34 #[cfg(target_pointer_width = "64")]
35 pub type c_ulong = u64;
36 pub type c_longlong = i64;
37 pub type c_ulonglong = u64;
38 pub type c_float = f32;
39 pub type c_double = f64;
40
41 pub use core::ffi::c_void;
42 }
43
44 // Confirm that our type definitions above match the actual type definitions.
45 #[cfg(test)]
46 mod assertions {
47 use super::ctypes;
48 static_assertions::assert_eq_size!(ctypes::c_char, libc::c_char);
49 static_assertions::assert_type_eq_all!(ctypes::c_schar, libc::c_schar);
50 static_assertions::assert_type_eq_all!(ctypes::c_uchar, libc::c_uchar);
51 static_assertions::assert_type_eq_all!(ctypes::c_short, libc::c_short);
52 static_assertions::assert_type_eq_all!(ctypes::c_ushort, libc::c_ushort);
53 static_assertions::assert_type_eq_all!(ctypes::c_int, libc::c_int);
54 static_assertions::assert_type_eq_all!(ctypes::c_uint, libc::c_uint);
55 static_assertions::assert_type_eq_all!(ctypes::c_long, libc::c_long);
56 static_assertions::assert_type_eq_all!(ctypes::c_ulong, libc::c_ulong);
57 static_assertions::assert_type_eq_all!(ctypes::c_longlong, libc::c_longlong);
58 static_assertions::assert_type_eq_all!(ctypes::c_ulonglong, libc::c_ulonglong);
59 static_assertions::assert_type_eq_all!(ctypes::c_float, libc::c_float);
60 static_assertions::assert_type_eq_all!(ctypes::c_double, libc::c_double);
61 }
62
63 // We don't enable `derive_eq` in bindgen because adding `PartialEq`/`Eq` to
64 // *all* structs noticeably increases compile times. But we can add a few
65 // manual impls where they're especially useful.
66 #[cfg(feature = "general")]
67 impl PartialEq for general::__kernel_timespec {
68 fn eq(&self, other: &Self) -> bool {
69 ({
70 let Self { tv_sec, tv_nsec } = self;
71 (tv_sec, tv_nsec)
72 }) == ({
73 let Self { tv_sec, tv_nsec } = other;
74 (tv_sec, tv_nsec)
75 })
76 }
77 }
78 #[cfg(feature = "general")]
79 impl Eq for general::__kernel_timespec {}
80
81 #[cfg(feature = "net")]
82 pub mod cmsg_macros {
83 use crate::ctypes::{c_long, c_uchar, c_uint};
84 use crate::net::{cmsghdr, msghdr};
85 use core::mem::size_of;
86 use core::ptr;
87
88 pub const unsafe fn CMSG_ALIGN(len: c_uint) -> c_uint {
89 let c_long_size = size_of::<c_long>() as c_uint;
90 (len + c_long_size - 1) & !(c_long_size - 1)
91 }
92
93 pub const unsafe fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar {
94 (cmsg as *mut c_uchar).add(size_of::<cmsghdr>())
95 }
96
97 pub const unsafe fn CMSG_SPACE(len: c_uint) -> c_uint {
98 size_of::<cmsghdr>() as c_uint + CMSG_ALIGN(len)
99 }
100
101 pub const unsafe fn CMSG_LEN(len: c_uint) -> c_uint {
102 size_of::<cmsghdr>() as c_uint + len
103 }
104
105 pub const unsafe fn CMSG_FIRSTHDR(mhdr: *const msghdr) -> *mut cmsghdr {
106 if (*mhdr).msg_controllen < size_of::<cmsghdr>() as _ {
107 return ptr::null_mut();
108 }
109
110 (*mhdr).msg_control as *mut cmsghdr
111 }
112
113 pub unsafe fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr {
114 // We convert from raw pointers to usize here, which may not be sound in a
115 // future version of Rust. Once the provenance rules are set in stone,
116 // it will be a good idea to give this function a once-over.
117
118 let cmsg_len = (*cmsg).cmsg_len;
119 let next_cmsg = (cmsg as *mut u8).add(CMSG_ALIGN(cmsg_len as _) as usize) as *mut cmsghdr;
120 let max = ((*mhdr).msg_control as usize) + ((*mhdr).msg_controllen as usize);
121
122 if cmsg_len < size_of::<cmsghdr>() as _ {
123 return ptr::null_mut();
124 }
125
126 if next_cmsg.add(1) as usize > max
127 || next_cmsg as usize + CMSG_ALIGN(cmsg_len as _) as usize > max
128 {
129 return ptr::null_mut();
130 }
131
132 next_cmsg
133 }
134 }
135
136 #[cfg(feature = "general")]
137 pub mod select_macros {
138 use crate::ctypes::c_int;
139 use crate::general::__kernel_fd_set;
140 use core::mem::size_of;
141
142 pub unsafe fn FD_CLR(fd: c_int, set: *mut __kernel_fd_set) {
143 let bytes = set as *mut u8;
144 if fd >= 0 {
145 *bytes.add((fd / 8) as usize) &= !(1 << (fd % 8));
146 }
147 }
148
149 pub unsafe fn FD_SET(fd: c_int, set: *mut __kernel_fd_set) {
150 let bytes = set as *mut u8;
151 if fd >= 0 {
152 *bytes.add((fd / 8) as usize) |= 1 << (fd % 8);
153 }
154 }
155
156 pub unsafe fn FD_ISSET(fd: c_int, set: *const __kernel_fd_set) -> bool {
157 let bytes = set as *const u8;
158 if fd >= 0 {
159 *bytes.add((fd / 8) as usize) & (1 << (fd % 8)) != 0
160 } else {
161 false
162 }
163 }
164
165 pub unsafe fn FD_ZERO(set: *mut __kernel_fd_set) {
166 let bytes = set as *mut u8;
167 core::ptr::write_bytes(bytes, 0, size_of::<__kernel_fd_set>());
168 }
169 }
170
171 #[cfg(feature = "general")]
172 pub mod signal_macros {
173 pub const SIG_DFL: super::general::__kernel_sighandler_t = None;
174
175 /// Rust doesn't currently permit us to use `transmute` to convert the
176 /// `SIG_IGN` value into a function pointer in a `const` initializer, so
177 /// we make it a function instead.
178 ///
179 #[inline]
180 pub const fn sig_ign() -> super::general::__kernel_sighandler_t {
181 // Safety: This creates an invalid pointer, but the pointer type
182 // includes `unsafe`, which covers the safety of calling it.
183 Some(unsafe {
184 core::mem::transmute::<usize, unsafe extern "C" fn(crate::ctypes::c_int)>(1)
185 })
186 }
187 }
188
189 // The rest of this file is auto-generated!
190 #[cfg(feature = "errno")]
191 #[cfg(target_arch = "arm")]
192 #[path = "arm/errno.rs"]
193 pub mod errno;
194 #[cfg(feature = "general")]
195 #[cfg(target_arch = "arm")]
196 #[path = "arm/general.rs"]
197 pub mod general;
198 #[cfg(feature = "if_ether")]
199 #[cfg(target_arch = "arm")]
200 #[path = "arm/if_ether.rs"]
201 pub mod if_ether;
202 #[cfg(feature = "io_uring")]
203 #[cfg(target_arch = "arm")]
204 #[path = "arm/io_uring.rs"]
205 pub mod io_uring;
206 #[cfg(feature = "ioctl")]
207 #[cfg(target_arch = "arm")]
208 #[path = "arm/ioctl.rs"]
209 pub mod ioctl;
210 #[cfg(feature = "net")]
211 #[cfg(target_arch = "arm")]
212 #[path = "arm/net.rs"]
213 pub mod net;
214 #[cfg(feature = "netlink")]
215 #[cfg(target_arch = "arm")]
216 #[path = "arm/netlink.rs"]
217 pub mod netlink;
218 #[cfg(feature = "prctl")]
219 #[cfg(target_arch = "arm")]
220 #[path = "arm/prctl.rs"]
221 pub mod prctl;
222 #[cfg(feature = "system")]
223 #[cfg(target_arch = "arm")]
224 #[path = "arm/system.rs"]
225 pub mod system;
226 #[cfg(feature = "errno")]
227 #[cfg(target_arch = "aarch64")]
228 #[path = "aarch64/errno.rs"]
229 pub mod errno;
230 #[cfg(feature = "general")]
231 #[cfg(target_arch = "aarch64")]
232 #[path = "aarch64/general.rs"]
233 pub mod general;
234 #[cfg(feature = "if_ether")]
235 #[cfg(target_arch = "aarch64")]
236 #[path = "aarch64/if_ether.rs"]
237 pub mod if_ether;
238 #[cfg(feature = "io_uring")]
239 #[cfg(target_arch = "aarch64")]
240 #[path = "aarch64/io_uring.rs"]
241 pub mod io_uring;
242 #[cfg(feature = "ioctl")]
243 #[cfg(target_arch = "aarch64")]
244 #[path = "aarch64/ioctl.rs"]
245 pub mod ioctl;
246 #[cfg(feature = "net")]
247 #[cfg(target_arch = "aarch64")]
248 #[path = "aarch64/net.rs"]
249 pub mod net;
250 #[cfg(feature = "netlink")]
251 #[cfg(target_arch = "aarch64")]
252 #[path = "aarch64/netlink.rs"]
253 pub mod netlink;
254 #[cfg(feature = "prctl")]
255 #[cfg(target_arch = "aarch64")]
256 #[path = "aarch64/prctl.rs"]
257 pub mod prctl;
258 #[cfg(feature = "system")]
259 #[cfg(target_arch = "aarch64")]
260 #[path = "aarch64/system.rs"]
261 pub mod system;
262 #[cfg(feature = "errno")]
263 #[cfg(target_arch = "loongarch64")]
264 #[path = "loongarch64/errno.rs"]
265 pub mod errno;
266 #[cfg(feature = "general")]
267 #[cfg(target_arch = "loongarch64")]
268 #[path = "loongarch64/general.rs"]
269 pub mod general;
270 #[cfg(feature = "if_ether")]
271 #[cfg(target_arch = "loongarch64")]
272 #[path = "loongarch64/if_ether.rs"]
273 pub mod if_ether;
274 #[cfg(feature = "io_uring")]
275 #[cfg(target_arch = "loongarch64")]
276 #[path = "loongarch64/io_uring.rs"]
277 pub mod io_uring;
278 #[cfg(feature = "ioctl")]
279 #[cfg(target_arch = "loongarch64")]
280 #[path = "loongarch64/ioctl.rs"]
281 pub mod ioctl;
282 #[cfg(feature = "net")]
283 #[cfg(target_arch = "loongarch64")]
284 #[path = "loongarch64/net.rs"]
285 pub mod net;
286 #[cfg(feature = "netlink")]
287 #[cfg(target_arch = "loongarch64")]
288 #[path = "loongarch64/netlink.rs"]
289 pub mod netlink;
290 #[cfg(feature = "prctl")]
291 #[cfg(target_arch = "loongarch64")]
292 #[path = "loongarch64/prctl.rs"]
293 pub mod prctl;
294 #[cfg(feature = "system")]
295 #[cfg(target_arch = "loongarch64")]
296 #[path = "loongarch64/system.rs"]
297 pub mod system;
298 #[cfg(feature = "errno")]
299 #[cfg(target_arch = "mips")]
300 #[path = "mips/errno.rs"]
301 pub mod errno;
302 #[cfg(feature = "general")]
303 #[cfg(target_arch = "mips")]
304 #[path = "mips/general.rs"]
305 pub mod general;
306 #[cfg(feature = "if_ether")]
307 #[cfg(target_arch = "mips")]
308 #[path = "mips/if_ether.rs"]
309 pub mod if_ether;
310 #[cfg(feature = "io_uring")]
311 #[cfg(target_arch = "mips")]
312 #[path = "mips/io_uring.rs"]
313 pub mod io_uring;
314 #[cfg(feature = "ioctl")]
315 #[cfg(target_arch = "mips")]
316 #[path = "mips/ioctl.rs"]
317 pub mod ioctl;
318 #[cfg(feature = "net")]
319 #[cfg(target_arch = "mips")]
320 #[path = "mips/net.rs"]
321 pub mod net;
322 #[cfg(feature = "netlink")]
323 #[cfg(target_arch = "mips")]
324 #[path = "mips/netlink.rs"]
325 pub mod netlink;
326 #[cfg(feature = "prctl")]
327 #[cfg(target_arch = "mips")]
328 #[path = "mips/prctl.rs"]
329 pub mod prctl;
330 #[cfg(feature = "system")]
331 #[cfg(target_arch = "mips")]
332 #[path = "mips/system.rs"]
333 pub mod system;
334 #[cfg(feature = "errno")]
335 #[cfg(target_arch = "mips64")]
336 #[path = "mips64/errno.rs"]
337 pub mod errno;
338 #[cfg(feature = "general")]
339 #[cfg(target_arch = "mips64")]
340 #[path = "mips64/general.rs"]
341 pub mod general;
342 #[cfg(feature = "if_ether")]
343 #[cfg(target_arch = "mips64")]
344 #[path = "mips64/if_ether.rs"]
345 pub mod if_ether;
346 #[cfg(feature = "io_uring")]
347 #[cfg(target_arch = "mips64")]
348 #[path = "mips64/io_uring.rs"]
349 pub mod io_uring;
350 #[cfg(feature = "ioctl")]
351 #[cfg(target_arch = "mips64")]
352 #[path = "mips64/ioctl.rs"]
353 pub mod ioctl;
354 #[cfg(feature = "net")]
355 #[cfg(target_arch = "mips64")]
356 #[path = "mips64/net.rs"]
357 pub mod net;
358 #[cfg(feature = "netlink")]
359 #[cfg(target_arch = "mips64")]
360 #[path = "mips64/netlink.rs"]
361 pub mod netlink;
362 #[cfg(feature = "prctl")]
363 #[cfg(target_arch = "mips64")]
364 #[path = "mips64/prctl.rs"]
365 pub mod prctl;
366 #[cfg(feature = "system")]
367 #[cfg(target_arch = "mips64")]
368 #[path = "mips64/system.rs"]
369 pub mod system;
370 #[cfg(feature = "errno")]
371 #[cfg(target_arch = "mips32r6")]
372 #[path = "mips32r6/errno.rs"]
373 pub mod errno;
374 #[cfg(feature = "general")]
375 #[cfg(target_arch = "mips32r6")]
376 #[path = "mips32r6/general.rs"]
377 pub mod general;
378 #[cfg(feature = "if_ether")]
379 #[cfg(target_arch = "mips32r6")]
380 #[path = "mips32r6/if_ether.rs"]
381 pub mod if_ether;
382 #[cfg(feature = "io_uring")]
383 #[cfg(target_arch = "mips32r6")]
384 #[path = "mips32r6/io_uring.rs"]
385 pub mod io_uring;
386 #[cfg(feature = "ioctl")]
387 #[cfg(target_arch = "mips32r6")]
388 #[path = "mips32r6/ioctl.rs"]
389 pub mod ioctl;
390 #[cfg(feature = "net")]
391 #[cfg(target_arch = "mips32r6")]
392 #[path = "mips32r6/net.rs"]
393 pub mod net;
394 #[cfg(feature = "netlink")]
395 #[cfg(target_arch = "mips32r6")]
396 #[path = "mips32r6/netlink.rs"]
397 pub mod netlink;
398 #[cfg(feature = "prctl")]
399 #[cfg(target_arch = "mips32r6")]
400 #[path = "mips32r6/prctl.rs"]
401 pub mod prctl;
402 #[cfg(feature = "system")]
403 #[cfg(target_arch = "mips32r6")]
404 #[path = "mips32r6/system.rs"]
405 pub mod system;
406 #[cfg(feature = "errno")]
407 #[cfg(target_arch = "mips64r6")]
408 #[path = "mips64r6/errno.rs"]
409 pub mod errno;
410 #[cfg(feature = "general")]
411 #[cfg(target_arch = "mips64r6")]
412 #[path = "mips64r6/general.rs"]
413 pub mod general;
414 #[cfg(feature = "if_ether")]
415 #[cfg(target_arch = "mips64r6")]
416 #[path = "mips64r6/if_ether.rs"]
417 pub mod if_ether;
418 #[cfg(feature = "io_uring")]
419 #[cfg(target_arch = "mips64r6")]
420 #[path = "mips64r6/io_uring.rs"]
421 pub mod io_uring;
422 #[cfg(feature = "ioctl")]
423 #[cfg(target_arch = "mips64r6")]
424 #[path = "mips64r6/ioctl.rs"]
425 pub mod ioctl;
426 #[cfg(feature = "net")]
427 #[cfg(target_arch = "mips64r6")]
428 #[path = "mips64r6/net.rs"]
429 pub mod net;
430 #[cfg(feature = "netlink")]
431 #[cfg(target_arch = "mips64r6")]
432 #[path = "mips64r6/netlink.rs"]
433 pub mod netlink;
434 #[cfg(feature = "prctl")]
435 #[cfg(target_arch = "mips64r6")]
436 #[path = "mips64r6/prctl.rs"]
437 pub mod prctl;
438 #[cfg(feature = "system")]
439 #[cfg(target_arch = "mips64r6")]
440 #[path = "mips64r6/system.rs"]
441 pub mod system;
442 #[cfg(feature = "errno")]
443 #[cfg(target_arch = "powerpc")]
444 #[path = "powerpc/errno.rs"]
445 pub mod errno;
446 #[cfg(feature = "general")]
447 #[cfg(target_arch = "powerpc")]
448 #[path = "powerpc/general.rs"]
449 pub mod general;
450 #[cfg(feature = "if_ether")]
451 #[cfg(target_arch = "powerpc")]
452 #[path = "powerpc/if_ether.rs"]
453 pub mod if_ether;
454 #[cfg(feature = "io_uring")]
455 #[cfg(target_arch = "powerpc")]
456 #[path = "powerpc/io_uring.rs"]
457 pub mod io_uring;
458 #[cfg(feature = "ioctl")]
459 #[cfg(target_arch = "powerpc")]
460 #[path = "powerpc/ioctl.rs"]
461 pub mod ioctl;
462 #[cfg(feature = "net")]
463 #[cfg(target_arch = "powerpc")]
464 #[path = "powerpc/net.rs"]
465 pub mod net;
466 #[cfg(feature = "netlink")]
467 #[cfg(target_arch = "powerpc")]
468 #[path = "powerpc/netlink.rs"]
469 pub mod netlink;
470 #[cfg(feature = "prctl")]
471 #[cfg(target_arch = "powerpc")]
472 #[path = "powerpc/prctl.rs"]
473 pub mod prctl;
474 #[cfg(feature = "system")]
475 #[cfg(target_arch = "powerpc")]
476 #[path = "powerpc/system.rs"]
477 pub mod system;
478 #[cfg(feature = "errno")]
479 #[cfg(target_arch = "powerpc64")]
480 #[path = "powerpc64/errno.rs"]
481 pub mod errno;
482 #[cfg(feature = "general")]
483 #[cfg(target_arch = "powerpc64")]
484 #[path = "powerpc64/general.rs"]
485 pub mod general;
486 #[cfg(feature = "if_ether")]
487 #[cfg(target_arch = "powerpc64")]
488 #[path = "powerpc64/if_ether.rs"]
489 pub mod if_ether;
490 #[cfg(feature = "io_uring")]
491 #[cfg(target_arch = "powerpc64")]
492 #[path = "powerpc64/io_uring.rs"]
493 pub mod io_uring;
494 #[cfg(feature = "ioctl")]
495 #[cfg(target_arch = "powerpc64")]
496 #[path = "powerpc64/ioctl.rs"]
497 pub mod ioctl;
498 #[cfg(feature = "net")]
499 #[cfg(target_arch = "powerpc64")]
500 #[path = "powerpc64/net.rs"]
501 pub mod net;
502 #[cfg(feature = "netlink")]
503 #[cfg(target_arch = "powerpc64")]
504 #[path = "powerpc64/netlink.rs"]
505 pub mod netlink;
506 #[cfg(feature = "prctl")]
507 #[cfg(target_arch = "powerpc64")]
508 #[path = "powerpc64/prctl.rs"]
509 pub mod prctl;
510 #[cfg(feature = "system")]
511 #[cfg(target_arch = "powerpc64")]
512 #[path = "powerpc64/system.rs"]
513 pub mod system;
514 #[cfg(feature = "errno")]
515 #[cfg(target_arch = "riscv32")]
516 #[path = "riscv32/errno.rs"]
517 pub mod errno;
518 #[cfg(feature = "general")]
519 #[cfg(target_arch = "riscv32")]
520 #[path = "riscv32/general.rs"]
521 pub mod general;
522 #[cfg(feature = "if_ether")]
523 #[cfg(target_arch = "riscv32")]
524 #[path = "riscv32/if_ether.rs"]
525 pub mod if_ether;
526 #[cfg(feature = "io_uring")]
527 #[cfg(target_arch = "riscv32")]
528 #[path = "riscv32/io_uring.rs"]
529 pub mod io_uring;
530 #[cfg(feature = "ioctl")]
531 #[cfg(target_arch = "riscv32")]
532 #[path = "riscv32/ioctl.rs"]
533 pub mod ioctl;
534 #[cfg(feature = "net")]
535 #[cfg(target_arch = "riscv32")]
536 #[path = "riscv32/net.rs"]
537 pub mod net;
538 #[cfg(feature = "netlink")]
539 #[cfg(target_arch = "riscv32")]
540 #[path = "riscv32/netlink.rs"]
541 pub mod netlink;
542 #[cfg(feature = "prctl")]
543 #[cfg(target_arch = "riscv32")]
544 #[path = "riscv32/prctl.rs"]
545 pub mod prctl;
546 #[cfg(feature = "system")]
547 #[cfg(target_arch = "riscv32")]
548 #[path = "riscv32/system.rs"]
549 pub mod system;
550 #[cfg(feature = "errno")]
551 #[cfg(target_arch = "riscv64")]
552 #[path = "riscv64/errno.rs"]
553 pub mod errno;
554 #[cfg(feature = "general")]
555 #[cfg(target_arch = "riscv64")]
556 #[path = "riscv64/general.rs"]
557 pub mod general;
558 #[cfg(feature = "if_ether")]
559 #[cfg(target_arch = "riscv64")]
560 #[path = "riscv64/if_ether.rs"]
561 pub mod if_ether;
562 #[cfg(feature = "io_uring")]
563 #[cfg(target_arch = "riscv64")]
564 #[path = "riscv64/io_uring.rs"]
565 pub mod io_uring;
566 #[cfg(feature = "ioctl")]
567 #[cfg(target_arch = "riscv64")]
568 #[path = "riscv64/ioctl.rs"]
569 pub mod ioctl;
570 #[cfg(feature = "net")]
571 #[cfg(target_arch = "riscv64")]
572 #[path = "riscv64/net.rs"]
573 pub mod net;
574 #[cfg(feature = "netlink")]
575 #[cfg(target_arch = "riscv64")]
576 #[path = "riscv64/netlink.rs"]
577 pub mod netlink;
578 #[cfg(feature = "prctl")]
579 #[cfg(target_arch = "riscv64")]
580 #[path = "riscv64/prctl.rs"]
581 pub mod prctl;
582 #[cfg(feature = "system")]
583 #[cfg(target_arch = "riscv64")]
584 #[path = "riscv64/system.rs"]
585 pub mod system;
586 #[cfg(feature = "errno")]
587 #[cfg(target_arch = "s390x")]
588 #[path = "s390x/errno.rs"]
589 pub mod errno;
590 #[cfg(feature = "general")]
591 #[cfg(target_arch = "s390x")]
592 #[path = "s390x/general.rs"]
593 pub mod general;
594 #[cfg(feature = "if_ether")]
595 #[cfg(target_arch = "s390x")]
596 #[path = "s390x/if_ether.rs"]
597 pub mod if_ether;
598 #[cfg(feature = "io_uring")]
599 #[cfg(target_arch = "s390x")]
600 #[path = "s390x/io_uring.rs"]
601 pub mod io_uring;
602 #[cfg(feature = "ioctl")]
603 #[cfg(target_arch = "s390x")]
604 #[path = "s390x/ioctl.rs"]
605 pub mod ioctl;
606 #[cfg(feature = "net")]
607 #[cfg(target_arch = "s390x")]
608 #[path = "s390x/net.rs"]
609 pub mod net;
610 #[cfg(feature = "netlink")]
611 #[cfg(target_arch = "s390x")]
612 #[path = "s390x/netlink.rs"]
613 pub mod netlink;
614 #[cfg(feature = "prctl")]
615 #[cfg(target_arch = "s390x")]
616 #[path = "s390x/prctl.rs"]
617 pub mod prctl;
618 #[cfg(feature = "system")]
619 #[cfg(target_arch = "s390x")]
620 #[path = "s390x/system.rs"]
621 pub mod system;
622 #[cfg(feature = "errno")]
623 #[cfg(target_arch = "sparc")]
624 #[path = "sparc/errno.rs"]
625 pub mod errno;
626 #[cfg(feature = "general")]
627 #[cfg(target_arch = "sparc")]
628 #[path = "sparc/general.rs"]
629 pub mod general;
630 #[cfg(feature = "if_ether")]
631 #[cfg(target_arch = "sparc")]
632 #[path = "sparc/if_ether.rs"]
633 pub mod if_ether;
634 #[cfg(feature = "io_uring")]
635 #[cfg(target_arch = "sparc")]
636 #[path = "sparc/io_uring.rs"]
637 pub mod io_uring;
638 #[cfg(feature = "ioctl")]
639 #[cfg(target_arch = "sparc")]
640 #[path = "sparc/ioctl.rs"]
641 pub mod ioctl;
642 #[cfg(feature = "net")]
643 #[cfg(target_arch = "sparc")]
644 #[path = "sparc/net.rs"]
645 pub mod net;
646 #[cfg(feature = "netlink")]
647 #[cfg(target_arch = "sparc")]
648 #[path = "sparc/netlink.rs"]
649 pub mod netlink;
650 #[cfg(feature = "prctl")]
651 #[cfg(target_arch = "sparc")]
652 #[path = "sparc/prctl.rs"]
653 pub mod prctl;
654 #[cfg(feature = "system")]
655 #[cfg(target_arch = "sparc")]
656 #[path = "sparc/system.rs"]
657 pub mod system;
658 #[cfg(feature = "errno")]
659 #[cfg(target_arch = "sparc64")]
660 #[path = "sparc64/errno.rs"]
661 pub mod errno;
662 #[cfg(feature = "general")]
663 #[cfg(target_arch = "sparc64")]
664 #[path = "sparc64/general.rs"]
665 pub mod general;
666 #[cfg(feature = "if_ether")]
667 #[cfg(target_arch = "sparc64")]
668 #[path = "sparc64/if_ether.rs"]
669 pub mod if_ether;
670 #[cfg(feature = "io_uring")]
671 #[cfg(target_arch = "sparc64")]
672 #[path = "sparc64/io_uring.rs"]
673 pub mod io_uring;
674 #[cfg(feature = "ioctl")]
675 #[cfg(target_arch = "sparc64")]
676 #[path = "sparc64/ioctl.rs"]
677 pub mod ioctl;
678 #[cfg(feature = "net")]
679 #[cfg(target_arch = "sparc64")]
680 #[path = "sparc64/net.rs"]
681 pub mod net;
682 #[cfg(feature = "netlink")]
683 #[cfg(target_arch = "sparc64")]
684 #[path = "sparc64/netlink.rs"]
685 pub mod netlink;
686 #[cfg(feature = "prctl")]
687 #[cfg(target_arch = "sparc64")]
688 #[path = "sparc64/prctl.rs"]
689 pub mod prctl;
690 #[cfg(feature = "system")]
691 #[cfg(target_arch = "sparc64")]
692 #[path = "sparc64/system.rs"]
693 pub mod system;
694 #[cfg(feature = "errno")]
695 #[cfg(target_arch = "x86")]
696 #[path = "x86/errno.rs"]
697 pub mod errno;
698 #[cfg(feature = "general")]
699 #[cfg(target_arch = "x86")]
700 #[path = "x86/general.rs"]
701 pub mod general;
702 #[cfg(feature = "if_ether")]
703 #[cfg(target_arch = "x86")]
704 #[path = "x86/if_ether.rs"]
705 pub mod if_ether;
706 #[cfg(feature = "io_uring")]
707 #[cfg(target_arch = "x86")]
708 #[path = "x86/io_uring.rs"]
709 pub mod io_uring;
710 #[cfg(feature = "ioctl")]
711 #[cfg(target_arch = "x86")]
712 #[path = "x86/ioctl.rs"]
713 pub mod ioctl;
714 #[cfg(feature = "net")]
715 #[cfg(target_arch = "x86")]
716 #[path = "x86/net.rs"]
717 pub mod net;
718 #[cfg(feature = "netlink")]
719 #[cfg(target_arch = "x86")]
720 #[path = "x86/netlink.rs"]
721 pub mod netlink;
722 #[cfg(feature = "prctl")]
723 #[cfg(target_arch = "x86")]
724 #[path = "x86/prctl.rs"]
725 pub mod prctl;
726 #[cfg(feature = "system")]
727 #[cfg(target_arch = "x86")]
728 #[path = "x86/system.rs"]
729 pub mod system;
730 #[cfg(feature = "errno")]
731 #[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
732 #[path = "x86_64/errno.rs"]
733 pub mod errno;
734 #[cfg(feature = "general")]
735 #[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
736 #[path = "x86_64/general.rs"]
737 pub mod general;
738 #[cfg(feature = "if_ether")]
739 #[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
740 #[path = "x86_64/if_ether.rs"]
741 pub mod if_ether;
742 #[cfg(feature = "io_uring")]
743 #[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
744 #[path = "x86_64/io_uring.rs"]
745 pub mod io_uring;
746 #[cfg(feature = "ioctl")]
747 #[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
748 #[path = "x86_64/ioctl.rs"]
749 pub mod ioctl;
750 #[cfg(feature = "net")]
751 #[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
752 #[path = "x86_64/net.rs"]
753 pub mod net;
754 #[cfg(feature = "netlink")]
755 #[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
756 #[path = "x86_64/netlink.rs"]
757 pub mod netlink;
758 #[cfg(feature = "prctl")]
759 #[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
760 #[path = "x86_64/prctl.rs"]
761 pub mod prctl;
762 #[cfg(feature = "system")]
763 #[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
764 #[path = "x86_64/system.rs"]
765 pub mod system;
766 #[cfg(feature = "errno")]
767 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
768 #[path = "x32/errno.rs"]
769 pub mod errno;
770 #[cfg(feature = "general")]
771 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
772 #[path = "x32/general.rs"]
773 pub mod general;
774 #[cfg(feature = "if_ether")]
775 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
776 #[path = "x32/if_ether.rs"]
777 pub mod if_ether;
778 #[cfg(feature = "io_uring")]
779 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
780 #[path = "x32/io_uring.rs"]
781 pub mod io_uring;
782 #[cfg(feature = "ioctl")]
783 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
784 #[path = "x32/ioctl.rs"]
785 pub mod ioctl;
786 #[cfg(feature = "net")]
787 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
788 #[path = "x32/net.rs"]
789 pub mod net;
790 #[cfg(feature = "netlink")]
791 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
792 #[path = "x32/netlink.rs"]
793 pub mod netlink;
794 #[cfg(feature = "prctl")]
795 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
796 #[path = "x32/prctl.rs"]
797 pub mod prctl;
798 #[cfg(feature = "system")]
799 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
800 #[path = "x32/system.rs"]
801 pub mod system;