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")]
5pub use std::os::raw as ctypes;
6
7#[cfg(all(not(feature = "std"), feature = "no_std"))]
8pub 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)]
46mod 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")]
67impl PartialEq for general::__kernel_timespec {
68 fn eq(&self, other: &Self) -> bool {
69 ({
70 let Self { tv_sec: &i64, tv_nsec: &i64 } = self;
71 (tv_sec, tv_nsec)
72 }) == ({
73 let Self { tv_sec: &i64, tv_nsec: &i64 } = other;
74 (tv_sec, tv_nsec)
75 })
76 }
77}
78#[cfg(feature = "general")]
79impl Eq for general::__kernel_timespec {}
80
81#[cfg(feature = "net")]
82pub 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")]
137pub 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")]
172pub 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)>(src:1)
185 })
186 }
187}
188
189#[cfg(feature = "elf")]
190pub mod elf;
191
192// The rest of this file is auto-generated!
193#[cfg(feature = "errno")]
194#[cfg(target_arch = "arm")]
195#[path = "arm/errno.rs"]
196pub mod errno;
197#[cfg(feature = "general")]
198#[cfg(target_arch = "arm")]
199#[path = "arm/general.rs"]
200pub mod general;
201#[cfg(feature = "if_ether")]
202#[cfg(target_arch = "arm")]
203#[path = "arm/if_ether.rs"]
204pub mod if_ether;
205#[cfg(feature = "io_uring")]
206#[cfg(target_arch = "arm")]
207#[path = "arm/io_uring.rs"]
208pub mod io_uring;
209#[cfg(feature = "ioctl")]
210#[cfg(target_arch = "arm")]
211#[path = "arm/ioctl.rs"]
212pub mod ioctl;
213#[cfg(feature = "net")]
214#[cfg(target_arch = "arm")]
215#[path = "arm/net.rs"]
216pub mod net;
217#[cfg(feature = "netlink")]
218#[cfg(target_arch = "arm")]
219#[path = "arm/netlink.rs"]
220pub mod netlink;
221#[cfg(feature = "prctl")]
222#[cfg(target_arch = "arm")]
223#[path = "arm/prctl.rs"]
224pub mod prctl;
225#[cfg(feature = "system")]
226#[cfg(target_arch = "arm")]
227#[path = "arm/system.rs"]
228pub mod system;
229#[cfg(feature = "errno")]
230#[cfg(target_arch = "aarch64")]
231#[path = "aarch64/errno.rs"]
232pub mod errno;
233#[cfg(feature = "general")]
234#[cfg(target_arch = "aarch64")]
235#[path = "aarch64/general.rs"]
236pub mod general;
237#[cfg(feature = "if_ether")]
238#[cfg(target_arch = "aarch64")]
239#[path = "aarch64/if_ether.rs"]
240pub mod if_ether;
241#[cfg(feature = "io_uring")]
242#[cfg(target_arch = "aarch64")]
243#[path = "aarch64/io_uring.rs"]
244pub mod io_uring;
245#[cfg(feature = "ioctl")]
246#[cfg(target_arch = "aarch64")]
247#[path = "aarch64/ioctl.rs"]
248pub mod ioctl;
249#[cfg(feature = "net")]
250#[cfg(target_arch = "aarch64")]
251#[path = "aarch64/net.rs"]
252pub mod net;
253#[cfg(feature = "netlink")]
254#[cfg(target_arch = "aarch64")]
255#[path = "aarch64/netlink.rs"]
256pub mod netlink;
257#[cfg(feature = "prctl")]
258#[cfg(target_arch = "aarch64")]
259#[path = "aarch64/prctl.rs"]
260pub mod prctl;
261#[cfg(feature = "system")]
262#[cfg(target_arch = "aarch64")]
263#[path = "aarch64/system.rs"]
264pub mod system;
265#[cfg(feature = "errno")]
266#[cfg(target_arch = "csky")]
267#[path = "csky/errno.rs"]
268pub mod errno;
269#[cfg(feature = "general")]
270#[cfg(target_arch = "csky")]
271#[path = "csky/general.rs"]
272pub mod general;
273#[cfg(feature = "if_ether")]
274#[cfg(target_arch = "csky")]
275#[path = "csky/if_ether.rs"]
276pub mod if_ether;
277#[cfg(feature = "io_uring")]
278#[cfg(target_arch = "csky")]
279#[path = "csky/io_uring.rs"]
280pub mod io_uring;
281#[cfg(feature = "ioctl")]
282#[cfg(target_arch = "csky")]
283#[path = "csky/ioctl.rs"]
284pub mod ioctl;
285#[cfg(feature = "net")]
286#[cfg(target_arch = "csky")]
287#[path = "csky/net.rs"]
288pub mod net;
289#[cfg(feature = "netlink")]
290#[cfg(target_arch = "csky")]
291#[path = "csky/netlink.rs"]
292pub mod netlink;
293#[cfg(feature = "prctl")]
294#[cfg(target_arch = "csky")]
295#[path = "csky/prctl.rs"]
296pub mod prctl;
297#[cfg(feature = "system")]
298#[cfg(target_arch = "csky")]
299#[path = "csky/system.rs"]
300pub mod system;
301#[cfg(feature = "errno")]
302#[cfg(target_arch = "loongarch64")]
303#[path = "loongarch64/errno.rs"]
304pub mod errno;
305#[cfg(feature = "general")]
306#[cfg(target_arch = "loongarch64")]
307#[path = "loongarch64/general.rs"]
308pub mod general;
309#[cfg(feature = "if_ether")]
310#[cfg(target_arch = "loongarch64")]
311#[path = "loongarch64/if_ether.rs"]
312pub mod if_ether;
313#[cfg(feature = "io_uring")]
314#[cfg(target_arch = "loongarch64")]
315#[path = "loongarch64/io_uring.rs"]
316pub mod io_uring;
317#[cfg(feature = "ioctl")]
318#[cfg(target_arch = "loongarch64")]
319#[path = "loongarch64/ioctl.rs"]
320pub mod ioctl;
321#[cfg(feature = "net")]
322#[cfg(target_arch = "loongarch64")]
323#[path = "loongarch64/net.rs"]
324pub mod net;
325#[cfg(feature = "netlink")]
326#[cfg(target_arch = "loongarch64")]
327#[path = "loongarch64/netlink.rs"]
328pub mod netlink;
329#[cfg(feature = "prctl")]
330#[cfg(target_arch = "loongarch64")]
331#[path = "loongarch64/prctl.rs"]
332pub mod prctl;
333#[cfg(feature = "system")]
334#[cfg(target_arch = "loongarch64")]
335#[path = "loongarch64/system.rs"]
336pub mod system;
337#[cfg(feature = "errno")]
338#[cfg(target_arch = "mips")]
339#[path = "mips/errno.rs"]
340pub mod errno;
341#[cfg(feature = "general")]
342#[cfg(target_arch = "mips")]
343#[path = "mips/general.rs"]
344pub mod general;
345#[cfg(feature = "if_ether")]
346#[cfg(target_arch = "mips")]
347#[path = "mips/if_ether.rs"]
348pub mod if_ether;
349#[cfg(feature = "io_uring")]
350#[cfg(target_arch = "mips")]
351#[path = "mips/io_uring.rs"]
352pub mod io_uring;
353#[cfg(feature = "ioctl")]
354#[cfg(target_arch = "mips")]
355#[path = "mips/ioctl.rs"]
356pub mod ioctl;
357#[cfg(feature = "net")]
358#[cfg(target_arch = "mips")]
359#[path = "mips/net.rs"]
360pub mod net;
361#[cfg(feature = "netlink")]
362#[cfg(target_arch = "mips")]
363#[path = "mips/netlink.rs"]
364pub mod netlink;
365#[cfg(feature = "prctl")]
366#[cfg(target_arch = "mips")]
367#[path = "mips/prctl.rs"]
368pub mod prctl;
369#[cfg(feature = "system")]
370#[cfg(target_arch = "mips")]
371#[path = "mips/system.rs"]
372pub mod system;
373#[cfg(feature = "errno")]
374#[cfg(target_arch = "mips64")]
375#[path = "mips64/errno.rs"]
376pub mod errno;
377#[cfg(feature = "general")]
378#[cfg(target_arch = "mips64")]
379#[path = "mips64/general.rs"]
380pub mod general;
381#[cfg(feature = "if_ether")]
382#[cfg(target_arch = "mips64")]
383#[path = "mips64/if_ether.rs"]
384pub mod if_ether;
385#[cfg(feature = "io_uring")]
386#[cfg(target_arch = "mips64")]
387#[path = "mips64/io_uring.rs"]
388pub mod io_uring;
389#[cfg(feature = "ioctl")]
390#[cfg(target_arch = "mips64")]
391#[path = "mips64/ioctl.rs"]
392pub mod ioctl;
393#[cfg(feature = "net")]
394#[cfg(target_arch = "mips64")]
395#[path = "mips64/net.rs"]
396pub mod net;
397#[cfg(feature = "netlink")]
398#[cfg(target_arch = "mips64")]
399#[path = "mips64/netlink.rs"]
400pub mod netlink;
401#[cfg(feature = "prctl")]
402#[cfg(target_arch = "mips64")]
403#[path = "mips64/prctl.rs"]
404pub mod prctl;
405#[cfg(feature = "system")]
406#[cfg(target_arch = "mips64")]
407#[path = "mips64/system.rs"]
408pub mod system;
409#[cfg(feature = "errno")]
410#[cfg(target_arch = "mips32r6")]
411#[path = "mips32r6/errno.rs"]
412pub mod errno;
413#[cfg(feature = "general")]
414#[cfg(target_arch = "mips32r6")]
415#[path = "mips32r6/general.rs"]
416pub mod general;
417#[cfg(feature = "if_ether")]
418#[cfg(target_arch = "mips32r6")]
419#[path = "mips32r6/if_ether.rs"]
420pub mod if_ether;
421#[cfg(feature = "io_uring")]
422#[cfg(target_arch = "mips32r6")]
423#[path = "mips32r6/io_uring.rs"]
424pub mod io_uring;
425#[cfg(feature = "ioctl")]
426#[cfg(target_arch = "mips32r6")]
427#[path = "mips32r6/ioctl.rs"]
428pub mod ioctl;
429#[cfg(feature = "net")]
430#[cfg(target_arch = "mips32r6")]
431#[path = "mips32r6/net.rs"]
432pub mod net;
433#[cfg(feature = "netlink")]
434#[cfg(target_arch = "mips32r6")]
435#[path = "mips32r6/netlink.rs"]
436pub mod netlink;
437#[cfg(feature = "prctl")]
438#[cfg(target_arch = "mips32r6")]
439#[path = "mips32r6/prctl.rs"]
440pub mod prctl;
441#[cfg(feature = "system")]
442#[cfg(target_arch = "mips32r6")]
443#[path = "mips32r6/system.rs"]
444pub mod system;
445#[cfg(feature = "errno")]
446#[cfg(target_arch = "mips64r6")]
447#[path = "mips64r6/errno.rs"]
448pub mod errno;
449#[cfg(feature = "general")]
450#[cfg(target_arch = "mips64r6")]
451#[path = "mips64r6/general.rs"]
452pub mod general;
453#[cfg(feature = "if_ether")]
454#[cfg(target_arch = "mips64r6")]
455#[path = "mips64r6/if_ether.rs"]
456pub mod if_ether;
457#[cfg(feature = "io_uring")]
458#[cfg(target_arch = "mips64r6")]
459#[path = "mips64r6/io_uring.rs"]
460pub mod io_uring;
461#[cfg(feature = "ioctl")]
462#[cfg(target_arch = "mips64r6")]
463#[path = "mips64r6/ioctl.rs"]
464pub mod ioctl;
465#[cfg(feature = "net")]
466#[cfg(target_arch = "mips64r6")]
467#[path = "mips64r6/net.rs"]
468pub mod net;
469#[cfg(feature = "netlink")]
470#[cfg(target_arch = "mips64r6")]
471#[path = "mips64r6/netlink.rs"]
472pub mod netlink;
473#[cfg(feature = "prctl")]
474#[cfg(target_arch = "mips64r6")]
475#[path = "mips64r6/prctl.rs"]
476pub mod prctl;
477#[cfg(feature = "system")]
478#[cfg(target_arch = "mips64r6")]
479#[path = "mips64r6/system.rs"]
480pub mod system;
481#[cfg(feature = "errno")]
482#[cfg(target_arch = "powerpc")]
483#[path = "powerpc/errno.rs"]
484pub mod errno;
485#[cfg(feature = "general")]
486#[cfg(target_arch = "powerpc")]
487#[path = "powerpc/general.rs"]
488pub mod general;
489#[cfg(feature = "if_ether")]
490#[cfg(target_arch = "powerpc")]
491#[path = "powerpc/if_ether.rs"]
492pub mod if_ether;
493#[cfg(feature = "io_uring")]
494#[cfg(target_arch = "powerpc")]
495#[path = "powerpc/io_uring.rs"]
496pub mod io_uring;
497#[cfg(feature = "ioctl")]
498#[cfg(target_arch = "powerpc")]
499#[path = "powerpc/ioctl.rs"]
500pub mod ioctl;
501#[cfg(feature = "net")]
502#[cfg(target_arch = "powerpc")]
503#[path = "powerpc/net.rs"]
504pub mod net;
505#[cfg(feature = "netlink")]
506#[cfg(target_arch = "powerpc")]
507#[path = "powerpc/netlink.rs"]
508pub mod netlink;
509#[cfg(feature = "prctl")]
510#[cfg(target_arch = "powerpc")]
511#[path = "powerpc/prctl.rs"]
512pub mod prctl;
513#[cfg(feature = "system")]
514#[cfg(target_arch = "powerpc")]
515#[path = "powerpc/system.rs"]
516pub mod system;
517#[cfg(feature = "errno")]
518#[cfg(target_arch = "powerpc64")]
519#[path = "powerpc64/errno.rs"]
520pub mod errno;
521#[cfg(feature = "general")]
522#[cfg(target_arch = "powerpc64")]
523#[path = "powerpc64/general.rs"]
524pub mod general;
525#[cfg(feature = "if_ether")]
526#[cfg(target_arch = "powerpc64")]
527#[path = "powerpc64/if_ether.rs"]
528pub mod if_ether;
529#[cfg(feature = "io_uring")]
530#[cfg(target_arch = "powerpc64")]
531#[path = "powerpc64/io_uring.rs"]
532pub mod io_uring;
533#[cfg(feature = "ioctl")]
534#[cfg(target_arch = "powerpc64")]
535#[path = "powerpc64/ioctl.rs"]
536pub mod ioctl;
537#[cfg(feature = "net")]
538#[cfg(target_arch = "powerpc64")]
539#[path = "powerpc64/net.rs"]
540pub mod net;
541#[cfg(feature = "netlink")]
542#[cfg(target_arch = "powerpc64")]
543#[path = "powerpc64/netlink.rs"]
544pub mod netlink;
545#[cfg(feature = "prctl")]
546#[cfg(target_arch = "powerpc64")]
547#[path = "powerpc64/prctl.rs"]
548pub mod prctl;
549#[cfg(feature = "system")]
550#[cfg(target_arch = "powerpc64")]
551#[path = "powerpc64/system.rs"]
552pub mod system;
553#[cfg(feature = "errno")]
554#[cfg(target_arch = "riscv32")]
555#[path = "riscv32/errno.rs"]
556pub mod errno;
557#[cfg(feature = "general")]
558#[cfg(target_arch = "riscv32")]
559#[path = "riscv32/general.rs"]
560pub mod general;
561#[cfg(feature = "if_ether")]
562#[cfg(target_arch = "riscv32")]
563#[path = "riscv32/if_ether.rs"]
564pub mod if_ether;
565#[cfg(feature = "io_uring")]
566#[cfg(target_arch = "riscv32")]
567#[path = "riscv32/io_uring.rs"]
568pub mod io_uring;
569#[cfg(feature = "ioctl")]
570#[cfg(target_arch = "riscv32")]
571#[path = "riscv32/ioctl.rs"]
572pub mod ioctl;
573#[cfg(feature = "net")]
574#[cfg(target_arch = "riscv32")]
575#[path = "riscv32/net.rs"]
576pub mod net;
577#[cfg(feature = "netlink")]
578#[cfg(target_arch = "riscv32")]
579#[path = "riscv32/netlink.rs"]
580pub mod netlink;
581#[cfg(feature = "prctl")]
582#[cfg(target_arch = "riscv32")]
583#[path = "riscv32/prctl.rs"]
584pub mod prctl;
585#[cfg(feature = "system")]
586#[cfg(target_arch = "riscv32")]
587#[path = "riscv32/system.rs"]
588pub mod system;
589#[cfg(feature = "errno")]
590#[cfg(target_arch = "riscv64")]
591#[path = "riscv64/errno.rs"]
592pub mod errno;
593#[cfg(feature = "general")]
594#[cfg(target_arch = "riscv64")]
595#[path = "riscv64/general.rs"]
596pub mod general;
597#[cfg(feature = "if_ether")]
598#[cfg(target_arch = "riscv64")]
599#[path = "riscv64/if_ether.rs"]
600pub mod if_ether;
601#[cfg(feature = "io_uring")]
602#[cfg(target_arch = "riscv64")]
603#[path = "riscv64/io_uring.rs"]
604pub mod io_uring;
605#[cfg(feature = "ioctl")]
606#[cfg(target_arch = "riscv64")]
607#[path = "riscv64/ioctl.rs"]
608pub mod ioctl;
609#[cfg(feature = "net")]
610#[cfg(target_arch = "riscv64")]
611#[path = "riscv64/net.rs"]
612pub mod net;
613#[cfg(feature = "netlink")]
614#[cfg(target_arch = "riscv64")]
615#[path = "riscv64/netlink.rs"]
616pub mod netlink;
617#[cfg(feature = "prctl")]
618#[cfg(target_arch = "riscv64")]
619#[path = "riscv64/prctl.rs"]
620pub mod prctl;
621#[cfg(feature = "system")]
622#[cfg(target_arch = "riscv64")]
623#[path = "riscv64/system.rs"]
624pub mod system;
625#[cfg(feature = "errno")]
626#[cfg(target_arch = "s390x")]
627#[path = "s390x/errno.rs"]
628pub mod errno;
629#[cfg(feature = "general")]
630#[cfg(target_arch = "s390x")]
631#[path = "s390x/general.rs"]
632pub mod general;
633#[cfg(feature = "if_ether")]
634#[cfg(target_arch = "s390x")]
635#[path = "s390x/if_ether.rs"]
636pub mod if_ether;
637#[cfg(feature = "io_uring")]
638#[cfg(target_arch = "s390x")]
639#[path = "s390x/io_uring.rs"]
640pub mod io_uring;
641#[cfg(feature = "ioctl")]
642#[cfg(target_arch = "s390x")]
643#[path = "s390x/ioctl.rs"]
644pub mod ioctl;
645#[cfg(feature = "net")]
646#[cfg(target_arch = "s390x")]
647#[path = "s390x/net.rs"]
648pub mod net;
649#[cfg(feature = "netlink")]
650#[cfg(target_arch = "s390x")]
651#[path = "s390x/netlink.rs"]
652pub mod netlink;
653#[cfg(feature = "prctl")]
654#[cfg(target_arch = "s390x")]
655#[path = "s390x/prctl.rs"]
656pub mod prctl;
657#[cfg(feature = "system")]
658#[cfg(target_arch = "s390x")]
659#[path = "s390x/system.rs"]
660pub mod system;
661#[cfg(feature = "errno")]
662#[cfg(target_arch = "sparc")]
663#[path = "sparc/errno.rs"]
664pub mod errno;
665#[cfg(feature = "general")]
666#[cfg(target_arch = "sparc")]
667#[path = "sparc/general.rs"]
668pub mod general;
669#[cfg(feature = "if_ether")]
670#[cfg(target_arch = "sparc")]
671#[path = "sparc/if_ether.rs"]
672pub mod if_ether;
673#[cfg(feature = "io_uring")]
674#[cfg(target_arch = "sparc")]
675#[path = "sparc/io_uring.rs"]
676pub mod io_uring;
677#[cfg(feature = "ioctl")]
678#[cfg(target_arch = "sparc")]
679#[path = "sparc/ioctl.rs"]
680pub mod ioctl;
681#[cfg(feature = "net")]
682#[cfg(target_arch = "sparc")]
683#[path = "sparc/net.rs"]
684pub mod net;
685#[cfg(feature = "netlink")]
686#[cfg(target_arch = "sparc")]
687#[path = "sparc/netlink.rs"]
688pub mod netlink;
689#[cfg(feature = "prctl")]
690#[cfg(target_arch = "sparc")]
691#[path = "sparc/prctl.rs"]
692pub mod prctl;
693#[cfg(feature = "system")]
694#[cfg(target_arch = "sparc")]
695#[path = "sparc/system.rs"]
696pub mod system;
697#[cfg(feature = "errno")]
698#[cfg(target_arch = "sparc64")]
699#[path = "sparc64/errno.rs"]
700pub mod errno;
701#[cfg(feature = "general")]
702#[cfg(target_arch = "sparc64")]
703#[path = "sparc64/general.rs"]
704pub mod general;
705#[cfg(feature = "if_ether")]
706#[cfg(target_arch = "sparc64")]
707#[path = "sparc64/if_ether.rs"]
708pub mod if_ether;
709#[cfg(feature = "io_uring")]
710#[cfg(target_arch = "sparc64")]
711#[path = "sparc64/io_uring.rs"]
712pub mod io_uring;
713#[cfg(feature = "ioctl")]
714#[cfg(target_arch = "sparc64")]
715#[path = "sparc64/ioctl.rs"]
716pub mod ioctl;
717#[cfg(feature = "net")]
718#[cfg(target_arch = "sparc64")]
719#[path = "sparc64/net.rs"]
720pub mod net;
721#[cfg(feature = "netlink")]
722#[cfg(target_arch = "sparc64")]
723#[path = "sparc64/netlink.rs"]
724pub mod netlink;
725#[cfg(feature = "prctl")]
726#[cfg(target_arch = "sparc64")]
727#[path = "sparc64/prctl.rs"]
728pub mod prctl;
729#[cfg(feature = "system")]
730#[cfg(target_arch = "sparc64")]
731#[path = "sparc64/system.rs"]
732pub mod system;
733#[cfg(feature = "errno")]
734#[cfg(target_arch = "x86")]
735#[path = "x86/errno.rs"]
736pub mod errno;
737#[cfg(feature = "general")]
738#[cfg(target_arch = "x86")]
739#[path = "x86/general.rs"]
740pub mod general;
741#[cfg(feature = "if_ether")]
742#[cfg(target_arch = "x86")]
743#[path = "x86/if_ether.rs"]
744pub mod if_ether;
745#[cfg(feature = "io_uring")]
746#[cfg(target_arch = "x86")]
747#[path = "x86/io_uring.rs"]
748pub mod io_uring;
749#[cfg(feature = "ioctl")]
750#[cfg(target_arch = "x86")]
751#[path = "x86/ioctl.rs"]
752pub mod ioctl;
753#[cfg(feature = "net")]
754#[cfg(target_arch = "x86")]
755#[path = "x86/net.rs"]
756pub mod net;
757#[cfg(feature = "netlink")]
758#[cfg(target_arch = "x86")]
759#[path = "x86/netlink.rs"]
760pub mod netlink;
761#[cfg(feature = "prctl")]
762#[cfg(target_arch = "x86")]
763#[path = "x86/prctl.rs"]
764pub mod prctl;
765#[cfg(feature = "system")]
766#[cfg(target_arch = "x86")]
767#[path = "x86/system.rs"]
768pub mod system;
769#[cfg(feature = "errno")]
770#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
771#[path = "x86_64/errno.rs"]
772pub mod errno;
773#[cfg(feature = "general")]
774#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
775#[path = "x86_64/general.rs"]
776pub mod general;
777#[cfg(feature = "if_ether")]
778#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
779#[path = "x86_64/if_ether.rs"]
780pub mod if_ether;
781#[cfg(feature = "io_uring")]
782#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
783#[path = "x86_64/io_uring.rs"]
784pub mod io_uring;
785#[cfg(feature = "ioctl")]
786#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
787#[path = "x86_64/ioctl.rs"]
788pub mod ioctl;
789#[cfg(feature = "net")]
790#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
791#[path = "x86_64/net.rs"]
792pub mod net;
793#[cfg(feature = "netlink")]
794#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
795#[path = "x86_64/netlink.rs"]
796pub mod netlink;
797#[cfg(feature = "prctl")]
798#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
799#[path = "x86_64/prctl.rs"]
800pub mod prctl;
801#[cfg(feature = "system")]
802#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
803#[path = "x86_64/system.rs"]
804pub mod system;
805#[cfg(feature = "errno")]
806#[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
807#[path = "x32/errno.rs"]
808pub mod errno;
809#[cfg(feature = "general")]
810#[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
811#[path = "x32/general.rs"]
812pub mod general;
813#[cfg(feature = "if_ether")]
814#[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
815#[path = "x32/if_ether.rs"]
816pub mod if_ether;
817#[cfg(feature = "io_uring")]
818#[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
819#[path = "x32/io_uring.rs"]
820pub mod io_uring;
821#[cfg(feature = "ioctl")]
822#[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
823#[path = "x32/ioctl.rs"]
824pub mod ioctl;
825#[cfg(feature = "net")]
826#[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
827#[path = "x32/net.rs"]
828pub mod net;
829#[cfg(feature = "netlink")]
830#[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
831#[path = "x32/netlink.rs"]
832pub mod netlink;
833#[cfg(feature = "prctl")]
834#[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
835#[path = "x32/prctl.rs"]
836pub mod prctl;
837#[cfg(feature = "system")]
838#[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
839#[path = "x32/system.rs"]
840pub mod system;
841