Skip to main content

libc/unix/linux_like/linux/gnu/
mod.rs

1use crate::off64_t;
2use crate::prelude::*;
3
4pub type pthread_t = c_ulong;
5pub type __priority_which_t = c_uint;
6pub type __rlimit_resource_t = c_uint;
7pub type Lmid_t = c_long;
8pub type regoff_t = c_int;
9pub type __kernel_rwf_t = c_int;
10pub type __be16 = crate::__u16;
11
12cfg_if! {
13    if #[cfg(doc)] {
14        // Used in `linux::arch` to define ioctl constants.
15        pub(crate) type Ioctl = c_ulong;
16    } else {
17        #[doc(hidden)]
18        pub type Ioctl = c_ulong;
19    }
20}
21
22#[repr(C)]
#[allow(deprecated)]
pub struct aiocb {
    pub aio_fildes: c_int,
    pub aio_lio_opcode: c_int,
    pub aio_reqprio: c_int,
    pub aio_buf: *mut c_void,
    pub aio_nbytes: size_t,
    pub aio_sigevent: crate::sigevent,
    __next_prio: *mut aiocb,
    __abs_prio: c_int,
    __policy: c_int,
    __error_code: c_int,
    __return_value: ssize_t,
    pub aio_offset: off_t,
    __glibc_reserved: Padding<[c_char; 32]>,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for aiocb { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for aiocb {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<c_int>;
        let _: ::core::clone::AssertParamIsClone<*mut c_void>;
        let _: ::core::clone::AssertParamIsClone<size_t>;
        let _: ::core::clone::AssertParamIsClone<crate::sigevent>;
        let _: ::core::clone::AssertParamIsClone<*mut aiocb>;
        let _: ::core::clone::AssertParamIsClone<ssize_t>;
        let _: ::core::clone::AssertParamIsClone<off_t>;
        let _: ::core::clone::AssertParamIsClone<Padding<[c_char; 32]>>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for aiocb { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for aiocb {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["aio_fildes", "aio_lio_opcode", "aio_reqprio", "aio_buf",
                        "aio_nbytes", "aio_sigevent", "__next_prio", "__abs_prio",
                        "__policy", "__error_code", "__return_value", "aio_offset",
                        "__glibc_reserved"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.aio_fildes, &self.aio_lio_opcode, &self.aio_reqprio,
                        &self.aio_buf, &self.aio_nbytes, &self.aio_sigevent,
                        &self.__next_prio, &self.__abs_prio, &self.__policy,
                        &self.__error_code, &self.__return_value, &self.aio_offset,
                        &&self.__glibc_reserved];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "aiocb", names,
            values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct __exit_status {
    pub e_termination: c_short,
    pub e_exit: c_short,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for __exit_status { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for __exit_status {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<c_short>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for __exit_status { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for __exit_status {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f, "__exit_status",
            "e_termination", &self.e_termination, "e_exit", &&self.e_exit)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct __timeval {
    pub tv_sec: i32,
    pub tv_usec: i32,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for __timeval { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for __timeval {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<i32>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for __timeval { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for __timeval {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f, "__timeval",
            "tv_sec", &self.tv_sec, "tv_usec", &&self.tv_usec)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct glob64_t {
    pub gl_pathc: size_t,
    pub gl_pathv: *mut *mut c_char,
    pub gl_offs: size_t,
    pub gl_flags: c_int,
    __unused1: Padding<*mut c_void>,
    __unused2: Padding<*mut c_void>,
    __unused3: Padding<*mut c_void>,
    __unused4: Padding<*mut c_void>,
    __unused5: Padding<*mut c_void>,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for glob64_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for glob64_t {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<size_t>;
        let _: ::core::clone::AssertParamIsClone<*mut *mut c_char>;
        let _: ::core::clone::AssertParamIsClone<c_int>;
        let _: ::core::clone::AssertParamIsClone<Padding<*mut c_void>>;
        let _: ::core::clone::AssertParamIsClone<Padding<*mut c_void>>;
        let _: ::core::clone::AssertParamIsClone<Padding<*mut c_void>>;
        let _: ::core::clone::AssertParamIsClone<Padding<*mut c_void>>;
        let _: ::core::clone::AssertParamIsClone<Padding<*mut c_void>>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for glob64_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for glob64_t {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["gl_pathc", "gl_pathv", "gl_offs", "gl_flags", "__unused1",
                        "__unused2", "__unused3", "__unused4", "__unused5"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.gl_pathc, &self.gl_pathv, &self.gl_offs, &self.gl_flags,
                        &self.__unused1, &self.__unused2, &self.__unused3,
                        &self.__unused4, &&self.__unused5];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "glob64_t",
            names, values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct msghdr {
    pub msg_name: *mut c_void,
    pub msg_namelen: crate::socklen_t,
    pub msg_iov: *mut crate::iovec,
    pub msg_iovlen: size_t,
    pub msg_control: *mut c_void,
    pub msg_controllen: size_t,
    pub msg_flags: c_int,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for msghdr { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for msghdr {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<*mut c_void>;
        let _: ::core::clone::AssertParamIsClone<crate::socklen_t>;
        let _: ::core::clone::AssertParamIsClone<*mut crate::iovec>;
        let _: ::core::clone::AssertParamIsClone<size_t>;
        let _: ::core::clone::AssertParamIsClone<*mut c_void>;
        let _: ::core::clone::AssertParamIsClone<c_int>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for msghdr { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for msghdr {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["msg_name", "msg_namelen", "msg_iov", "msg_iovlen",
                        "msg_control", "msg_controllen", "msg_flags"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.msg_name, &self.msg_namelen, &self.msg_iov,
                        &self.msg_iovlen, &self.msg_control, &self.msg_controllen,
                        &&self.msg_flags];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "msghdr", names,
            values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct cmsghdr {
    pub cmsg_len: size_t,
    pub cmsg_level: c_int,
    pub cmsg_type: c_int,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for cmsghdr { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for cmsghdr {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<size_t>;
        let _: ::core::clone::AssertParamIsClone<c_int>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for cmsghdr { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for cmsghdr {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "cmsghdr",
            "cmsg_len", &self.cmsg_len, "cmsg_level", &self.cmsg_level,
            "cmsg_type", &&self.cmsg_type)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct termios {
    pub c_iflag: crate::tcflag_t,
    pub c_oflag: crate::tcflag_t,
    pub c_cflag: crate::tcflag_t,
    pub c_lflag: crate::tcflag_t,
    pub c_line: crate::cc_t,
    pub c_cc: [crate::cc_t; crate::NCCS],
    pub c_ispeed: crate::speed_t,
    pub c_ospeed: crate::speed_t,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for termios { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for termios {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::tcflag_t>;
        let _: ::core::clone::AssertParamIsClone<crate::tcflag_t>;
        let _: ::core::clone::AssertParamIsClone<crate::tcflag_t>;
        let _: ::core::clone::AssertParamIsClone<crate::tcflag_t>;
        let _: ::core::clone::AssertParamIsClone<crate::cc_t>;
        let _: ::core::clone::AssertParamIsClone<[crate::cc_t; crate::NCCS]>;
        let _: ::core::clone::AssertParamIsClone<crate::speed_t>;
        let _: ::core::clone::AssertParamIsClone<crate::speed_t>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for termios { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for termios {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["c_iflag", "c_oflag", "c_cflag", "c_lflag", "c_line", "c_cc",
                        "c_ispeed", "c_ospeed"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.c_iflag, &self.c_oflag, &self.c_cflag, &self.c_lflag,
                        &self.c_line, &self.c_cc, &self.c_ispeed, &&self.c_ospeed];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "termios",
            names, values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct mallinfo {
    pub arena: c_int,
    pub ordblks: c_int,
    pub smblks: c_int,
    pub hblks: c_int,
    pub hblkhd: c_int,
    pub usmblks: c_int,
    pub fsmblks: c_int,
    pub uordblks: c_int,
    pub fordblks: c_int,
    pub keepcost: c_int,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for mallinfo { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for mallinfo {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<c_int>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for mallinfo { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for mallinfo {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["arena", "ordblks", "smblks", "hblks", "hblkhd", "usmblks",
                        "fsmblks", "uordblks", "fordblks", "keepcost"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.arena, &self.ordblks, &self.smblks, &self.hblks,
                        &self.hblkhd, &self.usmblks, &self.fsmblks, &self.uordblks,
                        &self.fordblks, &&self.keepcost];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "mallinfo",
            names, values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct mallinfo2 {
    pub arena: size_t,
    pub ordblks: size_t,
    pub smblks: size_t,
    pub hblks: size_t,
    pub hblkhd: size_t,
    pub usmblks: size_t,
    pub fsmblks: size_t,
    pub uordblks: size_t,
    pub fordblks: size_t,
    pub keepcost: size_t,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for mallinfo2 { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for mallinfo2 {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<size_t>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for mallinfo2 { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for mallinfo2 {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["arena", "ordblks", "smblks", "hblks", "hblkhd", "usmblks",
                        "fsmblks", "uordblks", "fordblks", "keepcost"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.arena, &self.ordblks, &self.smblks, &self.hblks,
                        &self.hblkhd, &self.usmblks, &self.fsmblks, &self.uordblks,
                        &self.fordblks, &&self.keepcost];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "mallinfo2",
            names, values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct ntptimeval {
    pub time: crate::timeval,
    pub maxerror: c_long,
    pub esterror: c_long,
    pub tai: c_long,
    pub __glibc_reserved1: c_long,
    pub __glibc_reserved2: c_long,
    pub __glibc_reserved3: c_long,
    pub __glibc_reserved4: c_long,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for ntptimeval { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for ntptimeval {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::timeval>;
        let _: ::core::clone::AssertParamIsClone<c_long>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for ntptimeval { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for ntptimeval {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["time", "maxerror", "esterror", "tai", "__glibc_reserved1",
                        "__glibc_reserved2", "__glibc_reserved3",
                        "__glibc_reserved4"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.time, &self.maxerror, &self.esterror, &self.tai,
                        &self.__glibc_reserved1, &self.__glibc_reserved2,
                        &self.__glibc_reserved3, &&self.__glibc_reserved4];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "ntptimeval",
            names, values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct regex_t {
    __buffer: *mut c_void,
    __allocated: size_t,
    __used: size_t,
    __syntax: c_ulong,
    __fastmap: *mut c_char,
    __translate: *mut c_char,
    __re_nsub: size_t,
    __bitfield: u8,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for regex_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for regex_t {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<*mut c_void>;
        let _: ::core::clone::AssertParamIsClone<size_t>;
        let _: ::core::clone::AssertParamIsClone<c_ulong>;
        let _: ::core::clone::AssertParamIsClone<*mut c_char>;
        let _: ::core::clone::AssertParamIsClone<*mut c_char>;
        let _: ::core::clone::AssertParamIsClone<u8>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for regex_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for regex_t {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["__buffer", "__allocated", "__used", "__syntax", "__fastmap",
                        "__translate", "__re_nsub", "__bitfield"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.__buffer, &self.__allocated, &self.__used, &self.__syntax,
                        &self.__fastmap, &self.__translate, &self.__re_nsub,
                        &&self.__bitfield];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "regex_t",
            names, values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct Elf64_Chdr {
    pub ch_type: crate::Elf64_Word,
    pub ch_reserved: crate::Elf64_Word,
    pub ch_size: crate::Elf64_Xword,
    pub ch_addralign: crate::Elf64_Xword,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for Elf64_Chdr { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for Elf64_Chdr {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::Elf64_Word>;
        let _: ::core::clone::AssertParamIsClone<crate::Elf64_Word>;
        let _: ::core::clone::AssertParamIsClone<crate::Elf64_Xword>;
        let _: ::core::clone::AssertParamIsClone<crate::Elf64_Xword>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for Elf64_Chdr { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for Elf64_Chdr {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f, "Elf64_Chdr",
            "ch_type", &self.ch_type, "ch_reserved", &self.ch_reserved,
            "ch_size", &self.ch_size, "ch_addralign", &&self.ch_addralign)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct Elf32_Chdr {
    pub ch_type: crate::Elf32_Word,
    pub ch_size: crate::Elf32_Word,
    pub ch_addralign: crate::Elf32_Word,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for Elf32_Chdr { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for Elf32_Chdr {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::Elf32_Word>;
        let _: ::core::clone::AssertParamIsClone<crate::Elf32_Word>;
        let _: ::core::clone::AssertParamIsClone<crate::Elf32_Word>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for Elf32_Chdr { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for Elf32_Chdr {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "Elf32_Chdr",
            "ch_type", &self.ch_type, "ch_size", &self.ch_size,
            "ch_addralign", &&self.ch_addralign)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct seminfo {
    pub semmap: c_int,
    pub semmni: c_int,
    pub semmns: c_int,
    pub semmnu: c_int,
    pub semmsl: c_int,
    pub semopm: c_int,
    pub semume: c_int,
    pub semusz: c_int,
    pub semvmx: c_int,
    pub semaem: c_int,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for seminfo { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for seminfo {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<c_int>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for seminfo { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for seminfo {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["semmap", "semmni", "semmns", "semmnu", "semmsl", "semopm",
                        "semume", "semusz", "semvmx", "semaem"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.semmap, &self.semmni, &self.semmns, &self.semmnu,
                        &self.semmsl, &self.semopm, &self.semume, &self.semusz,
                        &self.semvmx, &&self.semaem];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "seminfo",
            names, values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct ptrace_peeksiginfo_args {
    pub off: crate::__u64,
    pub flags: crate::__u32,
    pub nr: crate::__s32,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for ptrace_peeksiginfo_args { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for ptrace_peeksiginfo_args {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<crate::__u32>;
        let _: ::core::clone::AssertParamIsClone<crate::__s32>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for ptrace_peeksiginfo_args { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for ptrace_peeksiginfo_args {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f,
            "ptrace_peeksiginfo_args", "off", &self.off, "flags", &self.flags,
            "nr", &&self.nr)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct __c_anonymous_ptrace_syscall_info_entry {
    pub nr: crate::__u64,
    pub args: [crate::__u64; 6],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for
    __c_anonymous_ptrace_syscall_info_entry {
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for __c_anonymous_ptrace_syscall_info_entry {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<[crate::__u64; 6]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for __c_anonymous_ptrace_syscall_info_entry { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for __c_anonymous_ptrace_syscall_info_entry {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f,
            "__c_anonymous_ptrace_syscall_info_entry", "nr", &self.nr, "args",
            &&self.args)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct __c_anonymous_ptrace_syscall_info_exit {
    pub sval: crate::__s64,
    pub is_error: crate::__u8,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for
    __c_anonymous_ptrace_syscall_info_exit {
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for __c_anonymous_ptrace_syscall_info_exit {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::__s64>;
        let _: ::core::clone::AssertParamIsClone<crate::__u8>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for __c_anonymous_ptrace_syscall_info_exit { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for __c_anonymous_ptrace_syscall_info_exit {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f,
            "__c_anonymous_ptrace_syscall_info_exit", "sval", &self.sval,
            "is_error", &&self.is_error)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct __c_anonymous_ptrace_syscall_info_seccomp {
    pub nr: crate::__u64,
    pub args: [crate::__u64; 6],
    pub ret_data: crate::__u32,
    reserved2: Padding<crate::__u32>,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for
    __c_anonymous_ptrace_syscall_info_seccomp {
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for __c_anonymous_ptrace_syscall_info_seccomp {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<[crate::__u64; 6]>;
        let _: ::core::clone::AssertParamIsClone<crate::__u32>;
        let _: ::core::clone::AssertParamIsClone<Padding<crate::__u32>>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for __c_anonymous_ptrace_syscall_info_seccomp { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for __c_anonymous_ptrace_syscall_info_seccomp {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f,
            "__c_anonymous_ptrace_syscall_info_seccomp", "nr", &self.nr,
            "args", &self.args, "ret_data", &self.ret_data, "reserved2",
            &&self.reserved2)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct ptrace_syscall_info {
    pub op: crate::__u8,
    reserved: Padding<crate::__u8>,
    pub flags: crate::__u16,
    pub arch: crate::__u32,
    pub instruction_pointer: crate::__u64,
    pub stack_pointer: crate::__u64,
    pub u: __c_anonymous_ptrace_syscall_info_data,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for ptrace_syscall_info { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for ptrace_syscall_info {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::__u8>;
        let _: ::core::clone::AssertParamIsClone<Padding<crate::__u8>>;
        let _: ::core::clone::AssertParamIsClone<crate::__u16>;
        let _: ::core::clone::AssertParamIsClone<crate::__u32>;
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _:
                ::core::clone::AssertParamIsClone<__c_anonymous_ptrace_syscall_info_data>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for ptrace_syscall_info { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for ptrace_syscall_info {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["op", "reserved", "flags", "arch", "instruction_pointer",
                        "stack_pointer", "u"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.op, &self.reserved, &self.flags, &self.arch,
                        &self.instruction_pointer, &self.stack_pointer, &&self.u];
        ::core::fmt::Formatter::debug_struct_fields_finish(f,
            "ptrace_syscall_info", names, values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct ptrace_sud_config {
    pub mode: crate::__u64,
    pub selector: crate::__u64,
    pub offset: crate::__u64,
    pub len: crate::__u64,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for ptrace_sud_config { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for ptrace_sud_config {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for ptrace_sud_config { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for ptrace_sud_config {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f,
            "ptrace_sud_config", "mode", &self.mode, "selector",
            &self.selector, "offset", &self.offset, "len", &&self.len)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct iocb {
    pub aio_data: crate::__u64,
    pub aio_key: crate::__u32,
    pub aio_rw_flags: crate::__kernel_rwf_t,
    pub aio_lio_opcode: crate::__u16,
    pub aio_reqprio: crate::__s16,
    pub aio_fildes: crate::__u32,
    pub aio_buf: crate::__u64,
    pub aio_nbytes: crate::__u64,
    pub aio_offset: crate::__s64,
    aio_reserved2: Padding<crate::__u64>,
    pub aio_flags: crate::__u32,
    pub aio_resfd: crate::__u32,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for iocb { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for iocb {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<crate::__u32>;
        let _: ::core::clone::AssertParamIsClone<crate::__kernel_rwf_t>;
        let _: ::core::clone::AssertParamIsClone<crate::__u16>;
        let _: ::core::clone::AssertParamIsClone<crate::__s16>;
        let _: ::core::clone::AssertParamIsClone<crate::__u32>;
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<crate::__s64>;
        let _: ::core::clone::AssertParamIsClone<Padding<crate::__u64>>;
        let _: ::core::clone::AssertParamIsClone<crate::__u32>;
        let _: ::core::clone::AssertParamIsClone<crate::__u32>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for iocb { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for iocb {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["aio_data", "aio_key", "aio_rw_flags", "aio_lio_opcode",
                        "aio_reqprio", "aio_fildes", "aio_buf", "aio_nbytes",
                        "aio_offset", "aio_reserved2", "aio_flags", "aio_resfd"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.aio_data, &self.aio_key, &self.aio_rw_flags,
                        &self.aio_lio_opcode, &self.aio_reqprio, &self.aio_fildes,
                        &self.aio_buf, &self.aio_nbytes, &self.aio_offset,
                        &self.aio_reserved2, &self.aio_flags, &&self.aio_resfd];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "iocb", names,
            values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct tcp_info {
    pub tcpi_state: u8,
    pub tcpi_ca_state: u8,
    pub tcpi_retransmits: u8,
    pub tcpi_probes: u8,
    pub tcpi_backoff: u8,
    pub tcpi_options: u8,
    #[doc =
    r" This contains the bitfields `tcpi_snd_wscale` and `tcpi_rcv_wscale`."]
    #[doc = r" Each is 4 bits."]
    pub tcpi_snd_rcv_wscale: u8,
    pub tcpi_rto: u32,
    pub tcpi_ato: u32,
    pub tcpi_snd_mss: u32,
    pub tcpi_rcv_mss: u32,
    pub tcpi_unacked: u32,
    pub tcpi_sacked: u32,
    pub tcpi_lost: u32,
    pub tcpi_retrans: u32,
    pub tcpi_fackets: u32,
    pub tcpi_last_data_sent: u32,
    pub tcpi_last_ack_sent: u32,
    pub tcpi_last_data_recv: u32,
    pub tcpi_last_ack_recv: u32,
    pub tcpi_pmtu: u32,
    pub tcpi_rcv_ssthresh: u32,
    pub tcpi_rtt: u32,
    pub tcpi_rttvar: u32,
    pub tcpi_snd_ssthresh: u32,
    pub tcpi_snd_cwnd: u32,
    pub tcpi_advmss: u32,
    pub tcpi_reordering: u32,
    pub tcpi_rcv_rtt: u32,
    pub tcpi_rcv_space: u32,
    pub tcpi_total_retrans: u32,
    pub tcpi_pacing_rate: u64,
    pub tcpi_max_pacing_rate: u64,
    pub tcpi_bytes_acked: u64,
    pub tcpi_bytes_received: u64,
    pub tcpi_segs_out: u32,
    pub tcpi_segs_in: u32,
    pub tcpi_notsent_bytes: u32,
    pub tcpi_min_rtt: u32,
    pub tcpi_data_segs_in: u32,
    pub tcpi_data_segs_out: u32,
    pub tcpi_delivery_rate: u64,
    pub tcpi_busy_time: u64,
    pub tcpi_rwnd_limited: u64,
    pub tcpi_sndbuf_limited: u64,
    pub tcpi_delivered: u32,
    pub tcpi_delivered_ce: u32,
    pub tcpi_bytes_sent: u64,
    pub tcpi_bytes_retrans: u64,
    pub tcpi_dsack_dups: u32,
    pub tcpi_reord_seen: u32,
    pub tcpi_rcv_ooopack: u32,
    pub tcpi_snd_wnd: u32,
    pub tcpi_rcv_wnd: u32,
    pub tcpi_rehash: u32,
    pub tcpi_total_rto: u16,
    pub tcpi_total_rto_recoveries: u16,
    pub tcpi_total_rto_time: u32,
    pub tcpi_received_ce: u32,
    pub tcpi_delivered_e1_bytes: u32,
    pub tcpi_delivered_e0_bytes: u32,
    pub tcpi_delivered_ce_bytes: u32,
    pub tcpi_received_e1_bytes: u32,
    pub tcpi_received_e0_bytes: u32,
    pub tcpi_received_ce_bytes: u32,
    pub tcpi_accecn_fail_mode: u16,
    pub tcpi_accecn_opt_seen: u16,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for tcp_info { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for tcp_info {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<u8>;
        let _: ::core::clone::AssertParamIsClone<u32>;
        let _: ::core::clone::AssertParamIsClone<u64>;
        let _: ::core::clone::AssertParamIsClone<u16>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for tcp_info { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for tcp_info {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["tcpi_state", "tcpi_ca_state", "tcpi_retransmits",
                        "tcpi_probes", "tcpi_backoff", "tcpi_options",
                        "tcpi_snd_rcv_wscale", "tcpi_rto", "tcpi_ato",
                        "tcpi_snd_mss", "tcpi_rcv_mss", "tcpi_unacked",
                        "tcpi_sacked", "tcpi_lost", "tcpi_retrans", "tcpi_fackets",
                        "tcpi_last_data_sent", "tcpi_last_ack_sent",
                        "tcpi_last_data_recv", "tcpi_last_ack_recv", "tcpi_pmtu",
                        "tcpi_rcv_ssthresh", "tcpi_rtt", "tcpi_rttvar",
                        "tcpi_snd_ssthresh", "tcpi_snd_cwnd", "tcpi_advmss",
                        "tcpi_reordering", "tcpi_rcv_rtt", "tcpi_rcv_space",
                        "tcpi_total_retrans", "tcpi_pacing_rate",
                        "tcpi_max_pacing_rate", "tcpi_bytes_acked",
                        "tcpi_bytes_received", "tcpi_segs_out", "tcpi_segs_in",
                        "tcpi_notsent_bytes", "tcpi_min_rtt", "tcpi_data_segs_in",
                        "tcpi_data_segs_out", "tcpi_delivery_rate",
                        "tcpi_busy_time", "tcpi_rwnd_limited",
                        "tcpi_sndbuf_limited", "tcpi_delivered",
                        "tcpi_delivered_ce", "tcpi_bytes_sent",
                        "tcpi_bytes_retrans", "tcpi_dsack_dups", "tcpi_reord_seen",
                        "tcpi_rcv_ooopack", "tcpi_snd_wnd", "tcpi_rcv_wnd",
                        "tcpi_rehash", "tcpi_total_rto",
                        "tcpi_total_rto_recoveries", "tcpi_total_rto_time",
                        "tcpi_received_ce", "tcpi_delivered_e1_bytes",
                        "tcpi_delivered_e0_bytes", "tcpi_delivered_ce_bytes",
                        "tcpi_received_e1_bytes", "tcpi_received_e0_bytes",
                        "tcpi_received_ce_bytes", "tcpi_accecn_fail_mode",
                        "tcpi_accecn_opt_seen"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.tcpi_state, &self.tcpi_ca_state, &self.tcpi_retransmits,
                        &self.tcpi_probes, &self.tcpi_backoff, &self.tcpi_options,
                        &self.tcpi_snd_rcv_wscale, &self.tcpi_rto, &self.tcpi_ato,
                        &self.tcpi_snd_mss, &self.tcpi_rcv_mss, &self.tcpi_unacked,
                        &self.tcpi_sacked, &self.tcpi_lost, &self.tcpi_retrans,
                        &self.tcpi_fackets, &self.tcpi_last_data_sent,
                        &self.tcpi_last_ack_sent, &self.tcpi_last_data_recv,
                        &self.tcpi_last_ack_recv, &self.tcpi_pmtu,
                        &self.tcpi_rcv_ssthresh, &self.tcpi_rtt, &self.tcpi_rttvar,
                        &self.tcpi_snd_ssthresh, &self.tcpi_snd_cwnd,
                        &self.tcpi_advmss, &self.tcpi_reordering,
                        &self.tcpi_rcv_rtt, &self.tcpi_rcv_space,
                        &self.tcpi_total_retrans, &self.tcpi_pacing_rate,
                        &self.tcpi_max_pacing_rate, &self.tcpi_bytes_acked,
                        &self.tcpi_bytes_received, &self.tcpi_segs_out,
                        &self.tcpi_segs_in, &self.tcpi_notsent_bytes,
                        &self.tcpi_min_rtt, &self.tcpi_data_segs_in,
                        &self.tcpi_data_segs_out, &self.tcpi_delivery_rate,
                        &self.tcpi_busy_time, &self.tcpi_rwnd_limited,
                        &self.tcpi_sndbuf_limited, &self.tcpi_delivered,
                        &self.tcpi_delivered_ce, &self.tcpi_bytes_sent,
                        &self.tcpi_bytes_retrans, &self.tcpi_dsack_dups,
                        &self.tcpi_reord_seen, &self.tcpi_rcv_ooopack,
                        &self.tcpi_snd_wnd, &self.tcpi_rcv_wnd, &self.tcpi_rehash,
                        &self.tcpi_total_rto, &self.tcpi_total_rto_recoveries,
                        &self.tcpi_total_rto_time, &self.tcpi_received_ce,
                        &self.tcpi_delivered_e1_bytes,
                        &self.tcpi_delivered_e0_bytes,
                        &self.tcpi_delivered_ce_bytes, &self.tcpi_received_e1_bytes,
                        &self.tcpi_received_e0_bytes, &self.tcpi_received_ce_bytes,
                        &self.tcpi_accecn_fail_mode, &&self.tcpi_accecn_opt_seen];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "tcp_info",
            names, values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct fanotify_event_info_pidfd {
    pub hdr: crate::fanotify_event_info_header,
    pub pidfd: crate::__s32,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for fanotify_event_info_pidfd { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for fanotify_event_info_pidfd {
    #[inline]
    fn clone(&self) -> Self {
        let _:
                ::core::clone::AssertParamIsClone<crate::fanotify_event_info_header>;
        let _: ::core::clone::AssertParamIsClone<crate::__s32>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for fanotify_event_info_pidfd { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for fanotify_event_info_pidfd {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f,
            "fanotify_event_info_pidfd", "hdr", &self.hdr, "pidfd",
            &&self.pidfd)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct fanotify_event_info_error {
    pub hdr: crate::fanotify_event_info_header,
    pub error: crate::__s32,
    pub error_count: crate::__u32,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for fanotify_event_info_error { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for fanotify_event_info_error {
    #[inline]
    fn clone(&self) -> Self {
        let _:
                ::core::clone::AssertParamIsClone<crate::fanotify_event_info_header>;
        let _: ::core::clone::AssertParamIsClone<crate::__s32>;
        let _: ::core::clone::AssertParamIsClone<crate::__u32>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for fanotify_event_info_error { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for fanotify_event_info_error {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f,
            "fanotify_event_info_error", "hdr", &self.hdr, "error",
            &self.error, "error_count", &&self.error_count)
    }
}
#[repr(C)]
#[allow(deprecated)]
#[repr(align(8))]
pub struct sem_t {
    __size: [c_char; 32],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for sem_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for sem_t {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<[c_char; 32]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for sem_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for sem_t {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field1_finish(f, "sem_t",
            "__size", &&self.__size)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct mbstate_t {
    __count: c_int,
    __wchb: [c_char; 4],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for mbstate_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for mbstate_t {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<c_int>;
        let _: ::core::clone::AssertParamIsClone<[c_char; 4]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for mbstate_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for mbstate_t {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f, "mbstate_t",
            "__count", &self.__count, "__wchb", &&self.__wchb)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct fpos64_t {
    __pos: off64_t,
    __state: crate::mbstate_t,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for fpos64_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for fpos64_t {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<off64_t>;
        let _: ::core::clone::AssertParamIsClone<crate::mbstate_t>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for fpos64_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for fpos64_t {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f, "fpos64_t",
            "__pos", &self.__pos, "__state", &&self.__state)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct fpos_t {
    __pos: off_t,
    __state: crate::mbstate_t,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for fpos_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for fpos_t {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<off_t>;
        let _: ::core::clone::AssertParamIsClone<crate::mbstate_t>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for fpos_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for fpos_t {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f, "fpos_t",
            "__pos", &self.__pos, "__state", &&self.__state)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct timespec {
    pub tv_sec: time_t,
    pub tv_nsec: c_long,
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::default::Default for timespec {
    #[inline]
    fn default() -> Self {
        Self {
            tv_sec: ::core::default::Default::default(),
            tv_nsec: ::core::default::Default::default(),
        }
    }
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for timespec { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for timespec {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<time_t>;
        let _: ::core::clone::AssertParamIsClone<c_long>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for timespec { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for timespec {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f, "timespec",
            "tv_sec", &self.tv_sec, "tv_nsec", &&self.tv_nsec)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct utmpx {
    pub ut_type: c_short,
    pub ut_pid: crate::pid_t,
    pub ut_line: [c_char; __UT_LINESIZE],
    pub ut_id: [c_char; 4],
    pub ut_user: [c_char; __UT_NAMESIZE],
    pub ut_host: [c_char; __UT_HOSTSIZE],
    pub ut_exit: __exit_status,
    pub ut_session: i32,
    pub ut_tv: __timeval,
    pub ut_addr_v6: [i32; 4],
    __glibc_reserved: Padding<[c_char; 20]>,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for utmpx { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for utmpx {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<c_short>;
        let _: ::core::clone::AssertParamIsClone<crate::pid_t>;
        let _: ::core::clone::AssertParamIsClone<[c_char; __UT_LINESIZE]>;
        let _: ::core::clone::AssertParamIsClone<[c_char; 4]>;
        let _: ::core::clone::AssertParamIsClone<[c_char; __UT_NAMESIZE]>;
        let _: ::core::clone::AssertParamIsClone<[c_char; __UT_HOSTSIZE]>;
        let _: ::core::clone::AssertParamIsClone<__exit_status>;
        let _: ::core::clone::AssertParamIsClone<i32>;
        let _: ::core::clone::AssertParamIsClone<__timeval>;
        let _: ::core::clone::AssertParamIsClone<[i32; 4]>;
        let _: ::core::clone::AssertParamIsClone<Padding<[c_char; 20]>>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for utmpx { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for utmpx {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["ut_type", "ut_pid", "ut_line", "ut_id", "ut_user", "ut_host",
                        "ut_exit", "ut_session", "ut_tv", "ut_addr_v6",
                        "__glibc_reserved"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.ut_type, &self.ut_pid, &self.ut_line, &self.ut_id,
                        &self.ut_user, &self.ut_host, &self.ut_exit,
                        &self.ut_session, &self.ut_tv, &self.ut_addr_v6,
                        &&self.__glibc_reserved];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "utmpx", names,
            values)
    }
}s! {
23    pub struct aiocb {
24        pub aio_fildes: c_int,
25        pub aio_lio_opcode: c_int,
26        pub aio_reqprio: c_int,
27        pub aio_buf: *mut c_void,
28        pub aio_nbytes: size_t,
29        pub aio_sigevent: crate::sigevent,
30        __next_prio: *mut aiocb,
31        __abs_prio: c_int,
32        __policy: c_int,
33        __error_code: c_int,
34        __return_value: ssize_t,
35        pub aio_offset: off_t,
36        #[cfg(all(
37            not(gnu_file_offset_bits64),
38            not(target_arch = "x86_64"),
39            target_pointer_width = "32"
40        ))]
41        __unused1: Padding<[c_char; 4]>,
42        __glibc_reserved: Padding<[c_char; 32]>,
43    }
44
45    pub struct __exit_status {
46        pub e_termination: c_short,
47        pub e_exit: c_short,
48    }
49
50    pub struct __timeval {
51        pub tv_sec: i32,
52        pub tv_usec: i32,
53    }
54
55    pub struct glob64_t {
56        pub gl_pathc: size_t,
57        pub gl_pathv: *mut *mut c_char,
58        pub gl_offs: size_t,
59        pub gl_flags: c_int,
60
61        __unused1: Padding<*mut c_void>,
62        __unused2: Padding<*mut c_void>,
63        __unused3: Padding<*mut c_void>,
64        __unused4: Padding<*mut c_void>,
65        __unused5: Padding<*mut c_void>,
66    }
67
68    pub struct msghdr {
69        pub msg_name: *mut c_void,
70        pub msg_namelen: crate::socklen_t,
71        pub msg_iov: *mut crate::iovec,
72        pub msg_iovlen: size_t,
73        pub msg_control: *mut c_void,
74        pub msg_controllen: size_t,
75        pub msg_flags: c_int,
76    }
77
78    pub struct cmsghdr {
79        pub cmsg_len: size_t,
80        pub cmsg_level: c_int,
81        pub cmsg_type: c_int,
82    }
83
84    pub struct termios {
85        pub c_iflag: crate::tcflag_t,
86        pub c_oflag: crate::tcflag_t,
87        pub c_cflag: crate::tcflag_t,
88        pub c_lflag: crate::tcflag_t,
89        pub c_line: crate::cc_t,
90        pub c_cc: [crate::cc_t; crate::NCCS],
91        #[cfg(not(any(
92            target_arch = "sparc",
93            target_arch = "sparc64",
94            target_arch = "mips",
95            target_arch = "mips32r6",
96            target_arch = "mips64",
97            target_arch = "mips64r6"
98        )))]
99        pub c_ispeed: crate::speed_t,
100        #[cfg(not(any(
101            target_arch = "sparc",
102            target_arch = "sparc64",
103            target_arch = "mips",
104            target_arch = "mips32r6",
105            target_arch = "mips64",
106            target_arch = "mips64r6"
107        )))]
108        pub c_ospeed: crate::speed_t,
109    }
110
111    pub struct mallinfo {
112        pub arena: c_int,
113        pub ordblks: c_int,
114        pub smblks: c_int,
115        pub hblks: c_int,
116        pub hblkhd: c_int,
117        pub usmblks: c_int,
118        pub fsmblks: c_int,
119        pub uordblks: c_int,
120        pub fordblks: c_int,
121        pub keepcost: c_int,
122    }
123
124    pub struct mallinfo2 {
125        pub arena: size_t,
126        pub ordblks: size_t,
127        pub smblks: size_t,
128        pub hblks: size_t,
129        pub hblkhd: size_t,
130        pub usmblks: size_t,
131        pub fsmblks: size_t,
132        pub uordblks: size_t,
133        pub fordblks: size_t,
134        pub keepcost: size_t,
135    }
136
137    pub struct ntptimeval {
138        pub time: crate::timeval,
139        pub maxerror: c_long,
140        pub esterror: c_long,
141        pub tai: c_long,
142        pub __glibc_reserved1: c_long,
143        pub __glibc_reserved2: c_long,
144        pub __glibc_reserved3: c_long,
145        pub __glibc_reserved4: c_long,
146    }
147
148    pub struct regex_t {
149        __buffer: *mut c_void,
150        __allocated: size_t,
151        __used: size_t,
152        __syntax: c_ulong,
153        __fastmap: *mut c_char,
154        __translate: *mut c_char,
155        __re_nsub: size_t,
156        __bitfield: u8,
157    }
158
159    pub struct Elf64_Chdr {
160        pub ch_type: crate::Elf64_Word,
161        pub ch_reserved: crate::Elf64_Word,
162        pub ch_size: crate::Elf64_Xword,
163        pub ch_addralign: crate::Elf64_Xword,
164    }
165
166    pub struct Elf32_Chdr {
167        pub ch_type: crate::Elf32_Word,
168        pub ch_size: crate::Elf32_Word,
169        pub ch_addralign: crate::Elf32_Word,
170    }
171
172    pub struct seminfo {
173        pub semmap: c_int,
174        pub semmni: c_int,
175        pub semmns: c_int,
176        pub semmnu: c_int,
177        pub semmsl: c_int,
178        pub semopm: c_int,
179        pub semume: c_int,
180        pub semusz: c_int,
181        pub semvmx: c_int,
182        pub semaem: c_int,
183    }
184
185    pub struct ptrace_peeksiginfo_args {
186        pub off: crate::__u64,
187        pub flags: crate::__u32,
188        pub nr: crate::__s32,
189    }
190
191    pub struct __c_anonymous_ptrace_syscall_info_entry {
192        pub nr: crate::__u64,
193        pub args: [crate::__u64; 6],
194    }
195
196    pub struct __c_anonymous_ptrace_syscall_info_exit {
197        pub sval: crate::__s64,
198        pub is_error: crate::__u8,
199    }
200
201    pub struct __c_anonymous_ptrace_syscall_info_seccomp {
202        pub nr: crate::__u64,
203        pub args: [crate::__u64; 6],
204        pub ret_data: crate::__u32,
205        reserved2: Padding<crate::__u32>,
206    }
207
208    pub struct ptrace_syscall_info {
209        pub op: crate::__u8,
210        reserved: Padding<crate::__u8>,
211        pub flags: crate::__u16,
212        pub arch: crate::__u32,
213        pub instruction_pointer: crate::__u64,
214        pub stack_pointer: crate::__u64,
215        pub u: __c_anonymous_ptrace_syscall_info_data,
216    }
217
218    pub struct ptrace_sud_config {
219        pub mode: crate::__u64,
220        pub selector: crate::__u64,
221        pub offset: crate::__u64,
222        pub len: crate::__u64,
223    }
224
225    pub struct iocb {
226        pub aio_data: crate::__u64,
227        #[cfg(target_endian = "little")]
228        pub aio_key: crate::__u32,
229        #[cfg(target_endian = "little")]
230        pub aio_rw_flags: crate::__kernel_rwf_t,
231        #[cfg(target_endian = "big")]
232        pub aio_rw_flags: crate::__kernel_rwf_t,
233        #[cfg(target_endian = "big")]
234        pub aio_key: crate::__u32,
235        pub aio_lio_opcode: crate::__u16,
236        pub aio_reqprio: crate::__s16,
237        pub aio_fildes: crate::__u32,
238        pub aio_buf: crate::__u64,
239        pub aio_nbytes: crate::__u64,
240        pub aio_offset: crate::__s64,
241        aio_reserved2: Padding<crate::__u64>,
242        pub aio_flags: crate::__u32,
243        pub aio_resfd: crate::__u32,
244    }
245
246    // netinet/tcp.h
247
248    pub struct tcp_info {
249        pub tcpi_state: u8,
250        pub tcpi_ca_state: u8,
251        pub tcpi_retransmits: u8,
252        pub tcpi_probes: u8,
253        pub tcpi_backoff: u8,
254        pub tcpi_options: u8,
255        /// This contains the bitfields `tcpi_snd_wscale` and `tcpi_rcv_wscale`.
256        /// Each is 4 bits.
257        pub tcpi_snd_rcv_wscale: u8,
258
259        pub tcpi_rto: u32,
260        pub tcpi_ato: u32,
261        pub tcpi_snd_mss: u32,
262        pub tcpi_rcv_mss: u32,
263
264        pub tcpi_unacked: u32,
265        pub tcpi_sacked: u32,
266        pub tcpi_lost: u32,
267        pub tcpi_retrans: u32,
268        pub tcpi_fackets: u32,
269
270        pub tcpi_last_data_sent: u32,
271        pub tcpi_last_ack_sent: u32,
272        pub tcpi_last_data_recv: u32,
273        pub tcpi_last_ack_recv: u32,
274
275        pub tcpi_pmtu: u32,
276        pub tcpi_rcv_ssthresh: u32,
277        pub tcpi_rtt: u32,
278        pub tcpi_rttvar: u32,
279        pub tcpi_snd_ssthresh: u32,
280        pub tcpi_snd_cwnd: u32,
281        pub tcpi_advmss: u32,
282        pub tcpi_reordering: u32,
283
284        pub tcpi_rcv_rtt: u32,
285        pub tcpi_rcv_space: u32,
286
287        pub tcpi_total_retrans: u32,
288
289        pub tcpi_pacing_rate: u64,
290        pub tcpi_max_pacing_rate: u64,
291        pub tcpi_bytes_acked: u64,
292        pub tcpi_bytes_received: u64,
293        pub tcpi_segs_out: u32,
294        pub tcpi_segs_in: u32,
295
296        pub tcpi_notsent_bytes: u32,
297        pub tcpi_min_rtt: u32,
298        pub tcpi_data_segs_in: u32,
299        pub tcpi_data_segs_out: u32,
300
301        pub tcpi_delivery_rate: u64,
302
303        pub tcpi_busy_time: u64,
304        pub tcpi_rwnd_limited: u64,
305        pub tcpi_sndbuf_limited: u64,
306
307        pub tcpi_delivered: u32,
308        pub tcpi_delivered_ce: u32,
309
310        pub tcpi_bytes_sent: u64,
311        pub tcpi_bytes_retrans: u64,
312        pub tcpi_dsack_dups: u32,
313        pub tcpi_reord_seen: u32,
314
315        pub tcpi_rcv_ooopack: u32,
316        pub tcpi_snd_wnd: u32,
317        pub tcpi_rcv_wnd: u32,
318
319        pub tcpi_rehash: u32,
320        pub tcpi_total_rto: u16,
321        pub tcpi_total_rto_recoveries: u16,
322        pub tcpi_total_rto_time: u32,
323        pub tcpi_received_ce: u32,
324        pub tcpi_delivered_e1_bytes: u32,
325        pub tcpi_delivered_e0_bytes: u32,
326        pub tcpi_delivered_ce_bytes: u32,
327        pub tcpi_received_e1_bytes: u32,
328        pub tcpi_received_e0_bytes: u32,
329        pub tcpi_received_ce_bytes: u32,
330        pub tcpi_accecn_fail_mode: u16,
331        pub tcpi_accecn_opt_seen: u16,
332    }
333
334    pub struct fanotify_event_info_pidfd {
335        pub hdr: crate::fanotify_event_info_header,
336        pub pidfd: crate::__s32,
337    }
338
339    pub struct fanotify_event_info_error {
340        pub hdr: crate::fanotify_event_info_header,
341        pub error: crate::__s32,
342        pub error_count: crate::__u32,
343    }
344
345    // FIXME(1.0) this is actually a union
346    #[cfg_attr(target_pointer_width = "32", repr(align(4)))]
347    #[cfg_attr(target_pointer_width = "64", repr(align(8)))]
348    pub struct sem_t {
349        #[cfg(target_pointer_width = "32")]
350        __size: [c_char; 16],
351        #[cfg(target_pointer_width = "64")]
352        __size: [c_char; 32],
353    }
354
355    pub struct mbstate_t {
356        __count: c_int,
357        __wchb: [c_char; 4],
358    }
359
360    pub struct fpos64_t {
361        __pos: off64_t,
362        __state: crate::mbstate_t,
363    }
364
365    pub struct fpos_t {
366        #[cfg(not(gnu_file_offset_bits64))]
367        __pos: off_t,
368        #[cfg(gnu_file_offset_bits64)]
369        __pos: off64_t,
370        __state: crate::mbstate_t,
371    }
372
373    // linux x32 compatibility
374    // See https://sourceware.org/bugzilla/show_bug.cgi?id=16437
375    #[derive(Default)]
376    pub struct timespec {
377        pub tv_sec: time_t,
378        #[cfg(all(gnu_time_bits64, target_endian = "big"))]
379        __pad: Padding<i32>,
380        #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
381        pub tv_nsec: c_long,
382        #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
383        pub tv_nsec: i64,
384        #[cfg(all(gnu_time_bits64, target_endian = "little"))]
385        __pad: Padding<i32>,
386    }
387
388    pub struct utmpx {
389        pub ut_type: c_short,
390        pub ut_pid: crate::pid_t,
391        pub ut_line: [c_char; __UT_LINESIZE],
392        pub ut_id: [c_char; 4],
393
394        pub ut_user: [c_char; __UT_NAMESIZE],
395        pub ut_host: [c_char; __UT_HOSTSIZE],
396        pub ut_exit: __exit_status,
397
398        #[cfg(any(
399            target_arch = "aarch64",
400            target_arch = "s390x",
401            target_arch = "loongarch64",
402            all(target_pointer_width = "32", not(target_arch = "x86_64"))
403        ))]
404        pub ut_session: c_long,
405        #[cfg(any(
406            target_arch = "aarch64",
407            target_arch = "s390x",
408            target_arch = "loongarch64",
409            all(target_pointer_width = "32", not(target_arch = "x86_64"))
410        ))]
411        pub ut_tv: crate::timeval,
412
413        #[cfg(not(any(
414            target_arch = "aarch64",
415            target_arch = "s390x",
416            target_arch = "loongarch64",
417            all(target_pointer_width = "32", not(target_arch = "x86_64"))
418        )))]
419        pub ut_session: i32,
420        #[cfg(not(any(
421            target_arch = "aarch64",
422            target_arch = "s390x",
423            target_arch = "loongarch64",
424            all(target_pointer_width = "32", not(target_arch = "x86_64"))
425        )))]
426        pub ut_tv: __timeval,
427
428        pub ut_addr_v6: [i32; 4],
429        __glibc_reserved: Padding<[c_char; 20]>,
430    }
431}
432
433#[repr(C)]
#[repr(packed)]
pub struct ethhdr {
    pub h_dest: [c_uchar; crate::ETH_ALEN as usize],
    pub h_source: [c_uchar; crate::ETH_ALEN as usize],
    pub h_proto: crate::__be16,
}
#[automatically_derived]
#[doc(hidden)]
unsafe impl ::core::clone::TrivialClone for ethhdr { }
#[automatically_derived]
impl ::core::clone::Clone for ethhdr {
    #[inline]
    fn clone(&self) -> Self {
        let _:
                ::core::clone::AssertParamIsClone<[c_uchar; crate::ETH_ALEN as
                    usize]>;
        let _:
                ::core::clone::AssertParamIsClone<[c_uchar; crate::ETH_ALEN as
                    usize]>;
        let _: ::core::clone::AssertParamIsClone<crate::__be16>;
        *self
    }
}
#[automatically_derived]
impl ::core::marker::Copy for ethhdr { }
#[automatically_derived]
impl ::core::fmt::Debug for ethhdr {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "ethhdr",
            "h_dest", &{ self.h_dest }, "h_source", &{ self.h_source },
            "h_proto", &&{ self.h_proto })
    }
}s_no_extra_traits! {
434    // linux/if_ether.h
435
436    #[repr(packed)]
437    pub struct ethhdr {
438        pub h_dest: [c_uchar; crate::ETH_ALEN as usize],
439        pub h_source: [c_uchar; crate::ETH_ALEN as usize],
440        pub h_proto: crate::__be16,
441    }
442}
443
444#[repr(C)]
pub union __c_anonymous_ptrace_syscall_info_data {
    pub entry: __c_anonymous_ptrace_syscall_info_entry,
    pub exit: __c_anonymous_ptrace_syscall_info_exit,
    pub seccomp: __c_anonymous_ptrace_syscall_info_seccomp,
}
#[automatically_derived]
#[doc(hidden)]
unsafe impl ::core::clone::TrivialClone for
    __c_anonymous_ptrace_syscall_info_data {
}
#[automatically_derived]
impl ::core::clone::Clone for __c_anonymous_ptrace_syscall_info_data {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsCopy<Self>;
        *self
    }
}
#[automatically_derived]
impl ::core::marker::Copy for __c_anonymous_ptrace_syscall_info_data { }
#[allow(deprecated)]
impl ::core::fmt::Debug for __c_anonymous_ptrace_syscall_info_data {
    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
        f.debug_struct("__c_anonymous_ptrace_syscall_info_data").finish_non_exhaustive()
    }
}s_no_extra_traits! {
445    pub union __c_anonymous_ptrace_syscall_info_data {
446        pub entry: __c_anonymous_ptrace_syscall_info_entry,
447        pub exit: __c_anonymous_ptrace_syscall_info_exit,
448        pub seccomp: __c_anonymous_ptrace_syscall_info_seccomp,
449    }
450}
451
452cfg_if! {
453    if #[cfg(feature = "extra_traits")] {
454        impl PartialEq for __c_anonymous_ptrace_syscall_info_data {
455            fn eq(&self, other: &__c_anonymous_ptrace_syscall_info_data) -> bool {
456                unsafe {
457                    self.entry == other.entry
458                        || self.exit == other.exit
459                        || self.seccomp == other.seccomp
460                }
461            }
462        }
463
464        impl Eq for __c_anonymous_ptrace_syscall_info_data {}
465
466        impl hash::Hash for __c_anonymous_ptrace_syscall_info_data {
467            fn hash<H: hash::Hasher>(&self, state: &mut H) {
468                unsafe {
469                    self.entry.hash(state);
470                    self.exit.hash(state);
471                    self.seccomp.hash(state);
472                }
473            }
474        }
475    }
476}
477
478// include/uapi/asm-generic/hugetlb_encode.h
479pub const HUGETLB_FLAG_ENCODE_SHIFT: c_int = 26;
480pub const HUGETLB_FLAG_ENCODE_MASK: c_int = 0x3f;
481
482pub const HUGETLB_FLAG_ENCODE_64KB: c_int = 16 << HUGETLB_FLAG_ENCODE_SHIFT;
483pub const HUGETLB_FLAG_ENCODE_512KB: c_int = 19 << HUGETLB_FLAG_ENCODE_SHIFT;
484pub const HUGETLB_FLAG_ENCODE_1MB: c_int = 20 << HUGETLB_FLAG_ENCODE_SHIFT;
485pub const HUGETLB_FLAG_ENCODE_2MB: c_int = 21 << HUGETLB_FLAG_ENCODE_SHIFT;
486pub const HUGETLB_FLAG_ENCODE_8MB: c_int = 23 << HUGETLB_FLAG_ENCODE_SHIFT;
487pub const HUGETLB_FLAG_ENCODE_16MB: c_int = 24 << HUGETLB_FLAG_ENCODE_SHIFT;
488pub const HUGETLB_FLAG_ENCODE_32MB: c_int = 25 << HUGETLB_FLAG_ENCODE_SHIFT;
489pub const HUGETLB_FLAG_ENCODE_256MB: c_int = 28 << HUGETLB_FLAG_ENCODE_SHIFT;
490pub const HUGETLB_FLAG_ENCODE_512MB: c_int = 29 << HUGETLB_FLAG_ENCODE_SHIFT;
491pub const HUGETLB_FLAG_ENCODE_1GB: c_int = 30 << HUGETLB_FLAG_ENCODE_SHIFT;
492pub const HUGETLB_FLAG_ENCODE_2GB: c_int = 31 << HUGETLB_FLAG_ENCODE_SHIFT;
493pub const HUGETLB_FLAG_ENCODE_16GB: c_int = 34 << HUGETLB_FLAG_ENCODE_SHIFT;
494
495// include/uapi/linux/mman.h
496/*
497 * Huge page size encoding when MAP_HUGETLB is specified, and a huge page
498 * size other than the default is desired.  See hugetlb_encode.h.
499 * All known huge page size encodings are provided here.  It is the
500 * responsibility of the application to know which sizes are supported on
501 * the running system.  See mmap(2) man page for details.
502 */
503pub const MAP_HUGE_SHIFT: c_int = HUGETLB_FLAG_ENCODE_SHIFT;
504pub const MAP_HUGE_MASK: c_int = HUGETLB_FLAG_ENCODE_MASK;
505
506pub const MAP_HUGE_64KB: c_int = HUGETLB_FLAG_ENCODE_64KB;
507pub const MAP_HUGE_512KB: c_int = HUGETLB_FLAG_ENCODE_512KB;
508pub const MAP_HUGE_1MB: c_int = HUGETLB_FLAG_ENCODE_1MB;
509pub const MAP_HUGE_2MB: c_int = HUGETLB_FLAG_ENCODE_2MB;
510pub const MAP_HUGE_8MB: c_int = HUGETLB_FLAG_ENCODE_8MB;
511pub const MAP_HUGE_16MB: c_int = HUGETLB_FLAG_ENCODE_16MB;
512pub const MAP_HUGE_32MB: c_int = HUGETLB_FLAG_ENCODE_32MB;
513pub const MAP_HUGE_256MB: c_int = HUGETLB_FLAG_ENCODE_256MB;
514pub const MAP_HUGE_512MB: c_int = HUGETLB_FLAG_ENCODE_512MB;
515pub const MAP_HUGE_1GB: c_int = HUGETLB_FLAG_ENCODE_1GB;
516pub const MAP_HUGE_2GB: c_int = HUGETLB_FLAG_ENCODE_2GB;
517pub const MAP_HUGE_16GB: c_int = HUGETLB_FLAG_ENCODE_16GB;
518
519pub const PRIO_PROCESS: crate::__priority_which_t = 0;
520pub const PRIO_PGRP: crate::__priority_which_t = 1;
521pub const PRIO_USER: crate::__priority_which_t = 2;
522
523pub const __UT_LINESIZE: usize = 32;
524pub const __UT_NAMESIZE: usize = 32;
525pub const __UT_HOSTSIZE: usize = 256;
526pub const EMPTY: c_short = 0;
527pub const RUN_LVL: c_short = 1;
528pub const BOOT_TIME: c_short = 2;
529pub const NEW_TIME: c_short = 3;
530pub const OLD_TIME: c_short = 4;
531pub const INIT_PROCESS: c_short = 5;
532pub const LOGIN_PROCESS: c_short = 6;
533pub const USER_PROCESS: c_short = 7;
534pub const DEAD_PROCESS: c_short = 8;
535pub const ACCOUNTING: c_short = 9;
536
537// dlfcn.h
538pub const LM_ID_BASE: c_long = 0;
539pub const LM_ID_NEWLM: c_long = -1;
540
541pub const RTLD_DI_LMID: c_int = 1;
542pub const RTLD_DI_LINKMAP: c_int = 2;
543pub const RTLD_DI_CONFIGADDR: c_int = 3;
544pub const RTLD_DI_SERINFO: c_int = 4;
545pub const RTLD_DI_SERINFOSIZE: c_int = 5;
546pub const RTLD_DI_ORIGIN: c_int = 6;
547pub const RTLD_DI_PROFILENAME: c_int = 7;
548pub const RTLD_DI_PROFILEOUT: c_int = 8;
549pub const RTLD_DI_TLS_MODID: c_int = 9;
550pub const RTLD_DI_TLS_DATA: c_int = 10;
551
552pub const SOL_RXRPC: c_int = 272;
553pub const SOL_PPPOL2TP: c_int = 273;
554pub const SOL_PNPIPE: c_int = 275;
555pub const SOL_RDS: c_int = 276;
556pub const SOL_IUCV: c_int = 277;
557pub const SOL_CAIF: c_int = 278;
558pub const SOL_NFC: c_int = 280;
559
560pub const MSG_TRYHARD: c_int = 4;
561
562pub const LC_PAPER: c_int = 7;
563pub const LC_NAME: c_int = 8;
564pub const LC_ADDRESS: c_int = 9;
565pub const LC_TELEPHONE: c_int = 10;
566pub const LC_MEASUREMENT: c_int = 11;
567pub const LC_IDENTIFICATION: c_int = 12;
568pub const LC_PAPER_MASK: c_int = 1 << LC_PAPER;
569pub const LC_NAME_MASK: c_int = 1 << LC_NAME;
570pub const LC_ADDRESS_MASK: c_int = 1 << LC_ADDRESS;
571pub const LC_TELEPHONE_MASK: c_int = 1 << LC_TELEPHONE;
572pub const LC_MEASUREMENT_MASK: c_int = 1 << LC_MEASUREMENT;
573pub const LC_IDENTIFICATION_MASK: c_int = 1 << LC_IDENTIFICATION;
574pub const LC_ALL_MASK: c_int = crate::LC_CTYPE_MASK
575    | crate::LC_NUMERIC_MASK
576    | crate::LC_TIME_MASK
577    | crate::LC_COLLATE_MASK
578    | crate::LC_MONETARY_MASK
579    | crate::LC_MESSAGES_MASK
580    | LC_PAPER_MASK
581    | LC_NAME_MASK
582    | LC_ADDRESS_MASK
583    | LC_TELEPHONE_MASK
584    | LC_MEASUREMENT_MASK
585    | LC_IDENTIFICATION_MASK;
586
587pub const ENOTSUP: c_int = EOPNOTSUPP;
588
589pub const AF_IB: c_int = 27;
590pub const AF_MPLS: c_int = 28;
591pub const AF_NFC: c_int = 39;
592pub const AF_VSOCK: c_int = 40;
593pub const AF_XDP: c_int = 44;
594pub const PF_IB: c_int = AF_IB;
595pub const PF_MPLS: c_int = AF_MPLS;
596pub const PF_NFC: c_int = AF_NFC;
597pub const PF_VSOCK: c_int = AF_VSOCK;
598pub const PF_XDP: c_int = AF_XDP;
599
600pub const BUFSIZ: c_uint = 8192;
601pub const TMP_MAX: c_uint = 238328;
602pub const FOPEN_MAX: c_uint = 16;
603pub const FILENAME_MAX: c_uint = 4096;
604pub const HOST_NAME_MAX: c_int = 64;
605pub const _CS_GNU_LIBC_VERSION: c_int = 2;
606pub const _CS_GNU_LIBPTHREAD_VERSION: c_int = 3;
607pub const _CS_V6_ENV: c_int = 1148;
608pub const _CS_V7_ENV: c_int = 1149;
609pub const _SC_EQUIV_CLASS_MAX: c_int = 41;
610pub const _SC_CHARCLASS_NAME_MAX: c_int = 45;
611pub const _SC_PII: c_int = 53;
612pub const _SC_PII_XTI: c_int = 54;
613pub const _SC_PII_SOCKET: c_int = 55;
614pub const _SC_PII_INTERNET: c_int = 56;
615pub const _SC_PII_OSI: c_int = 57;
616pub const _SC_POLL: c_int = 58;
617pub const _SC_SELECT: c_int = 59;
618pub const _SC_PII_INTERNET_STREAM: c_int = 61;
619pub const _SC_PII_INTERNET_DGRAM: c_int = 62;
620pub const _SC_PII_OSI_COTS: c_int = 63;
621pub const _SC_PII_OSI_CLTS: c_int = 64;
622pub const _SC_PII_OSI_M: c_int = 65;
623pub const _SC_T_IOV_MAX: c_int = 66;
624pub const _SC_2_C_VERSION: c_int = 96;
625pub const _SC_CHAR_BIT: c_int = 101;
626pub const _SC_CHAR_MAX: c_int = 102;
627pub const _SC_CHAR_MIN: c_int = 103;
628pub const _SC_INT_MAX: c_int = 104;
629pub const _SC_INT_MIN: c_int = 105;
630pub const _SC_LONG_BIT: c_int = 106;
631pub const _SC_WORD_BIT: c_int = 107;
632pub const _SC_MB_LEN_MAX: c_int = 108;
633pub const _SC_SSIZE_MAX: c_int = 110;
634pub const _SC_SCHAR_MAX: c_int = 111;
635pub const _SC_SCHAR_MIN: c_int = 112;
636pub const _SC_SHRT_MAX: c_int = 113;
637pub const _SC_SHRT_MIN: c_int = 114;
638pub const _SC_UCHAR_MAX: c_int = 115;
639pub const _SC_UINT_MAX: c_int = 116;
640pub const _SC_ULONG_MAX: c_int = 117;
641pub const _SC_USHRT_MAX: c_int = 118;
642pub const _SC_NL_ARGMAX: c_int = 119;
643pub const _SC_NL_LANGMAX: c_int = 120;
644pub const _SC_NL_MSGMAX: c_int = 121;
645pub const _SC_NL_NMAX: c_int = 122;
646pub const _SC_NL_SETMAX: c_int = 123;
647pub const _SC_NL_TEXTMAX: c_int = 124;
648pub const _SC_BASE: c_int = 134;
649pub const _SC_C_LANG_SUPPORT: c_int = 135;
650pub const _SC_C_LANG_SUPPORT_R: c_int = 136;
651pub const _SC_DEVICE_IO: c_int = 140;
652pub const _SC_DEVICE_SPECIFIC: c_int = 141;
653pub const _SC_DEVICE_SPECIFIC_R: c_int = 142;
654pub const _SC_FD_MGMT: c_int = 143;
655pub const _SC_FIFO: c_int = 144;
656pub const _SC_PIPE: c_int = 145;
657pub const _SC_FILE_ATTRIBUTES: c_int = 146;
658pub const _SC_FILE_LOCKING: c_int = 147;
659pub const _SC_FILE_SYSTEM: c_int = 148;
660pub const _SC_MULTI_PROCESS: c_int = 150;
661pub const _SC_SINGLE_PROCESS: c_int = 151;
662pub const _SC_NETWORKING: c_int = 152;
663pub const _SC_REGEX_VERSION: c_int = 156;
664pub const _SC_SIGNALS: c_int = 158;
665pub const _SC_SYSTEM_DATABASE: c_int = 162;
666pub const _SC_SYSTEM_DATABASE_R: c_int = 163;
667pub const _SC_USER_GROUPS: c_int = 166;
668pub const _SC_USER_GROUPS_R: c_int = 167;
669pub const _SC_LEVEL1_ICACHE_SIZE: c_int = 185;
670pub const _SC_LEVEL1_ICACHE_ASSOC: c_int = 186;
671pub const _SC_LEVEL1_ICACHE_LINESIZE: c_int = 187;
672pub const _SC_LEVEL1_DCACHE_SIZE: c_int = 188;
673pub const _SC_LEVEL1_DCACHE_ASSOC: c_int = 189;
674pub const _SC_LEVEL1_DCACHE_LINESIZE: c_int = 190;
675pub const _SC_LEVEL2_CACHE_SIZE: c_int = 191;
676pub const _SC_LEVEL2_CACHE_ASSOC: c_int = 192;
677pub const _SC_LEVEL2_CACHE_LINESIZE: c_int = 193;
678pub const _SC_LEVEL3_CACHE_SIZE: c_int = 194;
679pub const _SC_LEVEL3_CACHE_ASSOC: c_int = 195;
680pub const _SC_LEVEL3_CACHE_LINESIZE: c_int = 196;
681pub const _SC_LEVEL4_CACHE_SIZE: c_int = 197;
682pub const _SC_LEVEL4_CACHE_ASSOC: c_int = 198;
683pub const _SC_LEVEL4_CACHE_LINESIZE: c_int = 199;
684pub const O_ACCMODE: c_int = 3;
685pub const ST_RELATIME: c_ulong = 4096;
686pub const NI_MAXHOST: crate::socklen_t = 1025;
687
688pub const CPU_SETSIZE: c_int = 0x400;
689
690pub const PTRACE_TRACEME: c_uint = 0;
691pub const PTRACE_PEEKTEXT: c_uint = 1;
692pub const PTRACE_PEEKDATA: c_uint = 2;
693pub const PTRACE_PEEKUSER: c_uint = 3;
694pub const PTRACE_POKETEXT: c_uint = 4;
695pub const PTRACE_POKEDATA: c_uint = 5;
696pub const PTRACE_POKEUSER: c_uint = 6;
697pub const PTRACE_CONT: c_uint = 7;
698pub const PTRACE_KILL: c_uint = 8;
699pub const PTRACE_SINGLESTEP: c_uint = 9;
700pub const PTRACE_ATTACH: c_uint = 16;
701pub const PTRACE_SYSCALL: c_uint = 24;
702pub const PTRACE_SETOPTIONS: c_uint = 0x4200;
703pub const PTRACE_GETEVENTMSG: c_uint = 0x4201;
704pub const PTRACE_GETSIGINFO: c_uint = 0x4202;
705pub const PTRACE_SETSIGINFO: c_uint = 0x4203;
706pub const PTRACE_GETREGSET: c_uint = 0x4204;
707pub const PTRACE_SETREGSET: c_uint = 0x4205;
708pub const PTRACE_SEIZE: c_uint = 0x4206;
709pub const PTRACE_INTERRUPT: c_uint = 0x4207;
710pub const PTRACE_LISTEN: c_uint = 0x4208;
711pub const PTRACE_PEEKSIGINFO: c_uint = 0x4209;
712pub const PTRACE_GETSIGMASK: c_uint = 0x420a;
713pub const PTRACE_SETSIGMASK: c_uint = 0x420b;
714pub const PTRACE_GET_SYSCALL_INFO: c_uint = 0x420e;
715pub const PTRACE_SET_SYSCALL_INFO: c_uint = 0x4212;
716pub const PTRACE_SYSCALL_INFO_NONE: crate::__u8 = 0;
717pub const PTRACE_SYSCALL_INFO_ENTRY: crate::__u8 = 1;
718pub const PTRACE_SYSCALL_INFO_EXIT: crate::__u8 = 2;
719pub const PTRACE_SYSCALL_INFO_SECCOMP: crate::__u8 = 3;
720pub const PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG: c_uint = 0x4210;
721pub const PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG: c_uint = 0x4211;
722
723// linux/rtnetlink.h
724pub const TCA_PAD: c_ushort = 9;
725pub const TCA_DUMP_INVISIBLE: c_ushort = 10;
726pub const TCA_CHAIN: c_ushort = 11;
727pub const TCA_HW_OFFLOAD: c_ushort = 12;
728
729pub const RTM_DELNETCONF: u16 = 81;
730pub const RTM_NEWSTATS: u16 = 92;
731pub const RTM_GETSTATS: u16 = 94;
732pub const RTM_NEWCACHEREPORT: u16 = 96;
733
734pub const RTM_F_LOOKUP_TABLE: c_uint = 0x1000;
735pub const RTM_F_FIB_MATCH: c_uint = 0x2000;
736
737pub const RTA_VIA: c_ushort = 18;
738pub const RTA_NEWDST: c_ushort = 19;
739pub const RTA_PREF: c_ushort = 20;
740pub const RTA_ENCAP_TYPE: c_ushort = 21;
741pub const RTA_ENCAP: c_ushort = 22;
742pub const RTA_EXPIRES: c_ushort = 23;
743pub const RTA_PAD: c_ushort = 24;
744pub const RTA_UID: c_ushort = 25;
745pub const RTA_TTL_PROPAGATE: c_ushort = 26;
746
747// linux/neighbor.h
748pub const NTF_EXT_LEARNED: u8 = 0x10;
749pub const NTF_OFFLOADED: u8 = 0x20;
750
751pub const NDA_MASTER: c_ushort = 9;
752pub const NDA_LINK_NETNSID: c_ushort = 10;
753pub const NDA_SRC_VNI: c_ushort = 11;
754
755// linux/personality.h
756pub const UNAME26: c_int = 0x0020000;
757pub const FDPIC_FUNCPTRS: c_int = 0x0080000;
758
759pub const GENL_UNS_ADMIN_PERM: c_int = 0x10;
760
761pub const GENL_ID_VFS_DQUOT: c_int = crate::NLMSG_MIN_TYPE + 1;
762pub const GENL_ID_PMCRAID: c_int = crate::NLMSG_MIN_TYPE + 2;
763
764pub const ELFOSABI_ARM_AEABI: u8 = 64;
765
766// linux/sched.h
767pub const CLONE_NEWTIME: c_int = 0x80;
768// DIFF(main): changed to `c_ulonglong` in e9abac9ac2. This is broken so should be fixed.
769#[allow(overflowing_literals)]
770#[deprecated(
771    since = "0.2.188",
772    note = "This constant overflows. In the near future, `libc` will change to a wider type, see #3584."
773)]
774pub const CLONE_CLEAR_SIGHAND: c_int = 0x100000000;
775#[allow(overflowing_literals)]
776#[deprecated(
777    since = "0.2.188",
778    note = "This constant overflows. In the near future, `libc` will change to a wider type, see #3584."
779)]
780pub const CLONE_INTO_CGROUP: c_int = 0x200000000;
781
782pub const M_MXFAST: c_int = 1;
783pub const M_NLBLKS: c_int = 2;
784pub const M_GRAIN: c_int = 3;
785pub const M_KEEP: c_int = 4;
786pub const M_TRIM_THRESHOLD: c_int = -1;
787pub const M_TOP_PAD: c_int = -2;
788pub const M_MMAP_THRESHOLD: c_int = -3;
789pub const M_MMAP_MAX: c_int = -4;
790pub const M_CHECK_ACTION: c_int = -5;
791pub const M_PERTURB: c_int = -6;
792pub const M_ARENA_TEST: c_int = -7;
793pub const M_ARENA_MAX: c_int = -8;
794
795pub const SOMAXCONN: c_int = 4096;
796
797// sys/timex.h
798pub const ADJ_OFFSET: c_uint = 0x0001;
799pub const ADJ_FREQUENCY: c_uint = 0x0002;
800pub const ADJ_MAXERROR: c_uint = 0x0004;
801pub const ADJ_ESTERROR: c_uint = 0x0008;
802pub const ADJ_STATUS: c_uint = 0x0010;
803pub const ADJ_TIMECONST: c_uint = 0x0020;
804pub const ADJ_TAI: c_uint = 0x0080;
805pub const ADJ_SETOFFSET: c_uint = 0x0100;
806pub const ADJ_MICRO: c_uint = 0x1000;
807pub const ADJ_NANO: c_uint = 0x2000;
808pub const ADJ_TICK: c_uint = 0x4000;
809pub const ADJ_OFFSET_SINGLESHOT: c_uint = 0x8001;
810pub const ADJ_OFFSET_SS_READ: c_uint = 0xa001;
811pub const MOD_OFFSET: c_uint = ADJ_OFFSET;
812pub const MOD_FREQUENCY: c_uint = ADJ_FREQUENCY;
813pub const MOD_MAXERROR: c_uint = ADJ_MAXERROR;
814pub const MOD_ESTERROR: c_uint = ADJ_ESTERROR;
815pub const MOD_STATUS: c_uint = ADJ_STATUS;
816pub const MOD_TIMECONST: c_uint = ADJ_TIMECONST;
817pub const MOD_CLKB: c_uint = ADJ_TICK;
818pub const MOD_CLKA: c_uint = ADJ_OFFSET_SINGLESHOT;
819pub const MOD_TAI: c_uint = ADJ_TAI;
820pub const MOD_MICRO: c_uint = ADJ_MICRO;
821pub const MOD_NANO: c_uint = ADJ_NANO;
822pub const STA_PLL: c_int = 0x0001;
823pub const STA_PPSFREQ: c_int = 0x0002;
824pub const STA_PPSTIME: c_int = 0x0004;
825pub const STA_FLL: c_int = 0x0008;
826pub const STA_INS: c_int = 0x0010;
827pub const STA_DEL: c_int = 0x0020;
828pub const STA_UNSYNC: c_int = 0x0040;
829pub const STA_FREQHOLD: c_int = 0x0080;
830pub const STA_PPSSIGNAL: c_int = 0x0100;
831pub const STA_PPSJITTER: c_int = 0x0200;
832pub const STA_PPSWANDER: c_int = 0x0400;
833pub const STA_PPSERROR: c_int = 0x0800;
834pub const STA_CLOCKERR: c_int = 0x1000;
835pub const STA_NANO: c_int = 0x2000;
836pub const STA_MODE: c_int = 0x4000;
837pub const STA_CLK: c_int = 0x8000;
838pub const STA_RONLY: c_int = STA_PPSSIGNAL
839    | STA_PPSJITTER
840    | STA_PPSWANDER
841    | STA_PPSERROR
842    | STA_CLOCKERR
843    | STA_NANO
844    | STA_MODE
845    | STA_CLK;
846pub const NTP_API: c_int = 4;
847pub const TIME_OK: c_int = 0;
848pub const TIME_INS: c_int = 1;
849pub const TIME_DEL: c_int = 2;
850pub const TIME_OOP: c_int = 3;
851pub const TIME_WAIT: c_int = 4;
852pub const TIME_ERROR: c_int = 5;
853pub const TIME_BAD: c_int = TIME_ERROR;
854pub const MAXTC: c_long = 6;
855
856// Portable GLOB_* flags are defined at the `linux_like` level.
857// The following are GNU extensions.
858pub const GLOB_PERIOD: c_int = 1 << 7;
859pub const GLOB_ALTDIRFUNC: c_int = 1 << 9;
860pub const GLOB_BRACE: c_int = 1 << 10;
861pub const GLOB_NOMAGIC: c_int = 1 << 11;
862pub const GLOB_TILDE: c_int = 1 << 12;
863pub const GLOB_ONLYDIR: c_int = 1 << 13;
864pub const GLOB_TILDE_CHECK: c_int = 1 << 14;
865
866pub const MADV_COLLAPSE: c_int = 25;
867
868// include/paths.h
869pub const _PATH_DEFPATH: *const c_char = cstr(b"/usr/bin:/bin\0");
870pub const _PATH_BSHELL: *const c_char = cstr(b"/bin/sh\0");
871
872cfg_if! {
873    if #[cfg(any(
874        target_arch = "arm",
875        target_arch = "x86",
876        target_arch = "x86_64",
877        target_arch = "s390x",
878        target_arch = "riscv64",
879        target_arch = "riscv32"
880    ))] {
881        pub const PTHREAD_STACK_MIN: size_t = 16384;
882    } else if #[cfg(any(target_arch = "sparc", target_arch = "sparc64"))] {
883        pub const PTHREAD_STACK_MIN: size_t = 0x6000;
884    } else {
885        pub const PTHREAD_STACK_MIN: size_t = 131072;
886    }
887}
888
889pub const REG_STARTEND: c_int = 4;
890
891pub const REG_EEND: c_int = 14;
892pub const REG_ESIZE: c_int = 15;
893pub const REG_ERPAREN: c_int = 16;
894
895extern "C" {
896    pub fn fgetspent_r(
897        fp: *mut crate::FILE,
898        spbuf: *mut crate::spwd,
899        buf: *mut c_char,
900        buflen: size_t,
901        spbufp: *mut *mut crate::spwd,
902    ) -> c_int;
903    pub fn sgetspent_r(
904        s: *const c_char,
905        spbuf: *mut crate::spwd,
906        buf: *mut c_char,
907        buflen: size_t,
908        spbufp: *mut *mut crate::spwd,
909    ) -> c_int;
910    pub fn getspent_r(
911        spbuf: *mut crate::spwd,
912        buf: *mut c_char,
913        buflen: size_t,
914        spbufp: *mut *mut crate::spwd,
915    ) -> c_int;
916    pub fn qsort_r(
917        base: *mut c_void,
918        num: size_t,
919        size: size_t,
920        compar: Option<unsafe extern "C" fn(*const c_void, *const c_void, *mut c_void) -> c_int>,
921        arg: *mut c_void,
922    );
923    #[cfg_attr(gnu_time_bits64, link_name = "__sendmmsg64")]
924    pub fn sendmmsg(
925        sockfd: c_int,
926        msgvec: *mut crate::mmsghdr,
927        vlen: c_uint,
928        flags: c_int,
929    ) -> c_int;
930    #[cfg_attr(gnu_time_bits64, link_name = "__recvmmsg64")]
931    pub fn recvmmsg(
932        sockfd: c_int,
933        msgvec: *mut crate::mmsghdr,
934        vlen: c_uint,
935        flags: c_int,
936        timeout: *mut crate::timespec,
937    ) -> c_int;
938
939    pub fn getrlimit64(resource: crate::__rlimit_resource_t, rlim: *mut crate::rlimit64) -> c_int;
940    pub fn setrlimit64(resource: crate::__rlimit_resource_t, rlim: *const crate::rlimit64)
941        -> c_int;
942    #[cfg_attr(gnu_file_offset_bits64, link_name = "getrlimit64")]
943    pub fn getrlimit(resource: crate::__rlimit_resource_t, rlim: *mut crate::rlimit) -> c_int;
944    #[cfg_attr(gnu_file_offset_bits64, link_name = "setrlimit64")]
945    pub fn setrlimit(resource: crate::__rlimit_resource_t, rlim: *const crate::rlimit) -> c_int;
946    #[cfg_attr(gnu_file_offset_bits64, link_name = "prlimit64")]
947    pub fn prlimit(
948        pid: crate::pid_t,
949        resource: crate::__rlimit_resource_t,
950        new_limit: *const crate::rlimit,
951        old_limit: *mut crate::rlimit,
952    ) -> c_int;
953    pub fn prlimit64(
954        pid: crate::pid_t,
955        resource: crate::__rlimit_resource_t,
956        new_limit: *const crate::rlimit64,
957        old_limit: *mut crate::rlimit64,
958    ) -> c_int;
959    pub fn utmpname(file: *const c_char) -> c_int;
960    pub fn utmpxname(file: *const c_char) -> c_int;
961    pub fn getutxent() -> *mut utmpx;
962    pub fn getutxid(ut: *const utmpx) -> *mut utmpx;
963    pub fn getutxline(ut: *const utmpx) -> *mut utmpx;
964    pub fn pututxline(ut: *const utmpx) -> *mut utmpx;
965    pub fn setutxent();
966    pub fn endutxent();
967    pub fn getpt() -> c_int;
968    pub fn mallopt(param: c_int, value: c_int) -> c_int;
969    #[cfg_attr(gnu_time_bits64, link_name = "__gettimeofday64")]
970    pub fn gettimeofday(tp: *mut crate::timeval, tz: *mut crate::timezone) -> c_int;
971    pub fn getentropy(buf: *mut c_void, buflen: size_t) -> c_int;
972    pub fn getrandom(buf: *mut c_void, buflen: size_t, flags: c_uint) -> ssize_t;
973    pub fn getauxval(type_: c_ulong) -> c_ulong;
974
975    #[cfg_attr(gnu_time_bits64, link_name = "___adjtimex64")]
976    pub fn adjtimex(buf: *mut timex) -> c_int;
977    #[cfg_attr(gnu_time_bits64, link_name = "___adjtimex64")]
978    pub fn ntp_adjtime(buf: *mut timex) -> c_int;
979    #[cfg_attr(not(gnu_time_bits64), link_name = "ntp_gettimex")]
980    #[cfg_attr(gnu_time_bits64, link_name = "__ntp_gettime64")]
981    pub fn ntp_gettime(buf: *mut ntptimeval) -> c_int;
982    #[cfg_attr(gnu_time_bits64, link_name = "__clock_adjtime64")]
983    pub fn clock_adjtime(clk_id: crate::clockid_t, buf: *mut crate::timex) -> c_int;
984
985    pub fn fanotify_mark(
986        fd: c_int,
987        flags: c_uint,
988        mask: u64,
989        dirfd: c_int,
990        path: *const c_char,
991    ) -> c_int;
992    #[cfg_attr(gnu_file_offset_bits64, link_name = "preadv64v2")]
993    pub fn preadv2(
994        fd: c_int,
995        iov: *const crate::iovec,
996        iovcnt: c_int,
997        offset: off_t,
998        flags: c_int,
999    ) -> ssize_t;
1000    #[cfg_attr(gnu_file_offset_bits64, link_name = "pwritev64v2")]
1001    pub fn pwritev2(
1002        fd: c_int,
1003        iov: *const crate::iovec,
1004        iovcnt: c_int,
1005        offset: off_t,
1006        flags: c_int,
1007    ) -> ssize_t;
1008    pub fn preadv64v2(
1009        fd: c_int,
1010        iov: *const crate::iovec,
1011        iovcnt: c_int,
1012        offset: off64_t,
1013        flags: c_int,
1014    ) -> ssize_t;
1015    pub fn pwritev64v2(
1016        fd: c_int,
1017        iov: *const crate::iovec,
1018        iovcnt: c_int,
1019        offset: off64_t,
1020        flags: c_int,
1021    ) -> ssize_t;
1022    pub fn renameat2(
1023        olddirfd: c_int,
1024        oldpath: *const c_char,
1025        newdirfd: c_int,
1026        newpath: *const c_char,
1027        flags: c_uint,
1028    ) -> c_int;
1029
1030    // Added in `glibc` 2.25
1031    pub fn explicit_bzero(s: *mut c_void, len: size_t);
1032    // Added in `glibc` 2.29
1033    pub fn reallocarray(ptr: *mut c_void, nmemb: size_t, size: size_t) -> *mut c_void;
1034
1035    pub fn ctermid(s: *mut c_char) -> *mut c_char;
1036    pub fn backtrace(buf: *mut *mut c_void, sz: c_int) -> c_int;
1037    pub fn backtrace_symbols(buffer: *const *mut c_void, len: c_int) -> *mut *mut c_char;
1038    pub fn backtrace_symbols_fd(buffer: *const *mut c_void, len: c_int, fd: c_int);
1039    #[cfg_attr(gnu_time_bits64, link_name = "__glob64_time64")]
1040    pub fn glob64(
1041        pattern: *const c_char,
1042        flags: c_int,
1043        errfunc: Option<extern "C" fn(epath: *const c_char, errno: c_int) -> c_int>,
1044        pglob: *mut glob64_t,
1045    ) -> c_int;
1046    #[cfg_attr(gnu_time_bits64, link_name = "__globfree64_time64")]
1047    pub fn globfree64(pglob: *mut glob64_t);
1048    pub fn ptrace(request: c_uint, ...) -> c_long;
1049    pub fn pthread_attr_getaffinity_np(
1050        attr: *const crate::pthread_attr_t,
1051        cpusetsize: size_t,
1052        cpuset: *mut crate::cpu_set_t,
1053    ) -> c_int;
1054    pub fn pthread_attr_setaffinity_np(
1055        attr: *mut crate::pthread_attr_t,
1056        cpusetsize: size_t,
1057        cpuset: *const crate::cpu_set_t,
1058    ) -> c_int;
1059    pub fn getpriority(which: crate::__priority_which_t, who: crate::id_t) -> c_int;
1060    pub fn setpriority(which: crate::__priority_which_t, who: crate::id_t, prio: c_int) -> c_int;
1061    pub fn pthread_rwlockattr_getkind_np(
1062        attr: *const crate::pthread_rwlockattr_t,
1063        val: *mut c_int,
1064    ) -> c_int;
1065    pub fn pthread_rwlockattr_setkind_np(
1066        attr: *mut crate::pthread_rwlockattr_t,
1067        val: c_int,
1068    ) -> c_int;
1069    pub fn pthread_sigqueue(thread: crate::pthread_t, sig: c_int, value: crate::sigval) -> c_int;
1070    pub fn pthread_tryjoin_np(thread: crate::pthread_t, retval: *mut *mut c_void) -> c_int;
1071    #[cfg_attr(
1072        all(target_pointer_width = "32", gnu_time_bits64),
1073        link_name = "__pthread_timedjoin_np64"
1074    )]
1075    pub fn pthread_timedjoin_np(
1076        thread: crate::pthread_t,
1077        retval: *mut *mut c_void,
1078        abstime: *const crate::timespec,
1079    ) -> c_int;
1080    pub fn mallinfo() -> crate::mallinfo;
1081    pub fn mallinfo2() -> crate::mallinfo2;
1082    pub fn malloc_stats();
1083    pub fn malloc_info(options: c_int, stream: *mut crate::FILE) -> c_int;
1084    pub fn malloc_usable_size(ptr: *mut c_void) -> size_t;
1085    pub fn getpwent_r(
1086        pwd: *mut crate::passwd,
1087        buf: *mut c_char,
1088        buflen: size_t,
1089        result: *mut *mut crate::passwd,
1090    ) -> c_int;
1091    pub fn getgrent_r(
1092        grp: *mut crate::group,
1093        buf: *mut c_char,
1094        buflen: size_t,
1095        result: *mut *mut crate::group,
1096    ) -> c_int;
1097    pub fn fgetpwent_r(
1098        stream: *mut crate::FILE,
1099        pwd: *mut crate::passwd,
1100        buf: *mut c_char,
1101        buflen: size_t,
1102        result: *mut *mut crate::passwd,
1103    ) -> c_int;
1104    pub fn fgetgrent_r(
1105        stream: *mut crate::FILE,
1106        grp: *mut crate::group,
1107        buf: *mut c_char,
1108        buflen: size_t,
1109        result: *mut *mut crate::group,
1110    ) -> c_int;
1111    pub fn getnetent_r(
1112        result_buf: *mut crate::netent,
1113        buf: *mut c_char,
1114        buflen: size_t,
1115        result: *mut *mut crate::netent,
1116        h_errnop: *mut c_int,
1117    ) -> c_int;
1118    pub fn getnetbyname_r(
1119        name: *const c_char,
1120        result_buf: *mut crate::netent,
1121        buf: *mut c_char,
1122        buflen: size_t,
1123        result: *mut *mut crate::netent,
1124        h_errnop: *mut c_int,
1125    ) -> c_int;
1126    pub fn getnetbyaddr_r(
1127        net: u32,
1128        type_: c_int,
1129        result_buf: *mut crate::netent,
1130        buf: *mut c_char,
1131        buflen: size_t,
1132        result: *mut *mut crate::netent,
1133        h_errnop: *mut c_int,
1134    ) -> c_int;
1135
1136    pub fn putpwent(p: *const crate::passwd, stream: *mut crate::FILE) -> c_int;
1137    pub fn putgrent(grp: *const crate::group, stream: *mut crate::FILE) -> c_int;
1138
1139    pub fn sethostid(hostid: c_long) -> c_int;
1140
1141    pub fn memfd_create(name: *const c_char, flags: c_uint) -> c_int;
1142    pub fn mlock2(addr: *const c_void, len: size_t, flags: c_uint) -> c_int;
1143
1144    pub fn euidaccess(pathname: *const c_char, mode: c_int) -> c_int;
1145    pub fn eaccess(pathname: *const c_char, mode: c_int) -> c_int;
1146
1147    pub fn asctime_r(tm: *const crate::tm, buf: *mut c_char) -> *mut c_char;
1148    #[cfg_attr(gnu_time_bits64, link_name = "__ctime64_r")]
1149    pub fn ctime_r(timep: *const time_t, buf: *mut c_char) -> *mut c_char;
1150
1151    pub fn dirname(path: *mut c_char) -> *mut c_char;
1152    /// POSIX version of `basename(3)`, defined in `libgen.h`.
1153    #[link_name = "__xpg_basename"]
1154    pub fn posix_basename(path: *mut c_char) -> *mut c_char;
1155    /// GNU version of `basename(3)`, defined in `string.h`.
1156    #[link_name = "basename"]
1157    pub fn gnu_basename(path: *const c_char) -> *mut c_char;
1158    pub fn dlmopen(lmid: Lmid_t, filename: *const c_char, flag: c_int) -> *mut c_void;
1159    pub fn dlinfo(handle: *mut c_void, request: c_int, info: *mut c_void) -> c_int;
1160    pub fn dladdr1(
1161        addr: *const c_void,
1162        info: *mut crate::Dl_info,
1163        extra_info: *mut *mut c_void,
1164        flags: c_int,
1165    ) -> c_int;
1166    pub fn dlvsym(
1167        handle: *mut c_void,
1168        symbol: *const c_char,
1169        version: *const c_char,
1170    ) -> *mut c_void;
1171    pub fn malloc_trim(__pad: size_t) -> c_int;
1172    pub fn gnu_get_libc_release() -> *const c_char;
1173    pub fn gnu_get_libc_version() -> *const c_char;
1174
1175    // posix/spawn.h
1176    // Added in `glibc` 2.29
1177    pub fn posix_spawn_file_actions_addchdir_np(
1178        actions: *mut crate::posix_spawn_file_actions_t,
1179        path: *const c_char,
1180    ) -> c_int;
1181    // Added in `glibc` 2.29
1182    pub fn posix_spawn_file_actions_addfchdir_np(
1183        actions: *mut crate::posix_spawn_file_actions_t,
1184        fd: c_int,
1185    ) -> c_int;
1186    // Added in `glibc` 2.34
1187    pub fn posix_spawn_file_actions_addclosefrom_np(
1188        actions: *mut crate::posix_spawn_file_actions_t,
1189        from: c_int,
1190    ) -> c_int;
1191    // Added in `glibc` 2.35
1192    pub fn posix_spawn_file_actions_addtcsetpgrp_np(
1193        actions: *mut crate::posix_spawn_file_actions_t,
1194        tcfd: c_int,
1195    ) -> c_int;
1196
1197    // mntent.h
1198    pub fn getmntent_r(
1199        stream: *mut crate::FILE,
1200        mntbuf: *mut crate::mntent,
1201        buf: *mut c_char,
1202        buflen: c_int,
1203    ) -> *mut crate::mntent;
1204
1205    pub fn execveat(
1206        dirfd: c_int,
1207        pathname: *const c_char,
1208        argv: *const *mut c_char,
1209        envp: *const *mut c_char,
1210        flags: c_int,
1211    ) -> c_int;
1212
1213    // Added in `glibc` 2.34
1214    pub fn close_range(first: c_uint, last: c_uint, flags: c_int) -> c_int;
1215
1216    pub fn mq_notify(mqdes: crate::mqd_t, sevp: *const crate::sigevent) -> c_int;
1217
1218    #[cfg_attr(gnu_time_bits64, link_name = "__epoll_pwait2_time64")]
1219    pub fn epoll_pwait2(
1220        epfd: c_int,
1221        events: *mut crate::epoll_event,
1222        maxevents: c_int,
1223        timeout: *const crate::timespec,
1224        sigmask: *const crate::sigset_t,
1225    ) -> c_int;
1226
1227    pub fn mempcpy(dest: *mut c_void, src: *const c_void, n: size_t) -> *mut c_void;
1228
1229    pub fn tgkill(tgid: crate::pid_t, tid: crate::pid_t, sig: c_int) -> c_int;
1230
1231    // glibc provides this in <unistd.h> with _GNU_SOURCE
1232    pub static mut environ: *mut *mut c_char;
1233}
1234
1235cfg_if! {
1236    if #[cfg(any(
1237        target_arch = "x86",
1238        target_arch = "arm",
1239        target_arch = "m68k",
1240        target_arch = "csky",
1241        target_arch = "mips",
1242        target_arch = "mips32r6",
1243        target_arch = "powerpc",
1244        target_arch = "sparc",
1245        target_arch = "riscv32"
1246    ))] {
1247        mod b32;
1248        pub use self::b32::*;
1249    } else if #[cfg(any(
1250        target_arch = "x86_64",
1251        target_arch = "aarch64",
1252        target_arch = "powerpc64",
1253        target_arch = "mips64",
1254        target_arch = "mips64r6",
1255        target_arch = "s390x",
1256        target_arch = "sparc64",
1257        target_arch = "riscv64",
1258        target_arch = "loongarch64"
1259    ))] {
1260        mod b64;
1261        pub use self::b64::*;
1262    } else {
1263        // Unknown target_arch
1264    }
1265}