1/* automatically generated by rust-bindgen 0.66.1 */
2
3pub type __s8 = crate::ctypes::c_schar;
4pub type __u8 = crate::ctypes::c_uchar;
5pub type __s16 = crate::ctypes::c_short;
6pub type __u16 = crate::ctypes::c_ushort;
7pub type __s32 = crate::ctypes::c_int;
8pub type __u32 = crate::ctypes::c_uint;
9pub type __s64 = crate::ctypes::c_longlong;
10pub type __u64 = crate::ctypes::c_ulonglong;
11pub type __kernel_key_t = crate::ctypes::c_int;
12pub type __kernel_mqd_t = crate::ctypes::c_int;
13pub type __kernel_old_uid_t = crate::ctypes::c_ushort;
14pub type __kernel_old_gid_t = crate::ctypes::c_ushort;
15pub type __kernel_old_dev_t = crate::ctypes::c_ulong;
16pub type __kernel_long_t = crate::ctypes::c_long;
17pub type __kernel_ulong_t = crate::ctypes::c_ulong;
18pub type __kernel_ino_t = __kernel_ulong_t;
19pub type __kernel_mode_t = crate::ctypes::c_uint;
20pub type __kernel_pid_t = crate::ctypes::c_int;
21pub type __kernel_ipc_pid_t = crate::ctypes::c_int;
22pub type __kernel_uid_t = crate::ctypes::c_uint;
23pub type __kernel_gid_t = crate::ctypes::c_uint;
24pub type __kernel_suseconds_t = __kernel_long_t;
25pub type __kernel_daddr_t = crate::ctypes::c_int;
26pub type __kernel_uid32_t = crate::ctypes::c_uint;
27pub type __kernel_gid32_t = crate::ctypes::c_uint;
28pub type __kernel_size_t = __kernel_ulong_t;
29pub type __kernel_ssize_t = __kernel_long_t;
30pub type __kernel_ptrdiff_t = __kernel_long_t;
31pub type __kernel_off_t = __kernel_long_t;
32pub type __kernel_loff_t = crate::ctypes::c_longlong;
33pub type __kernel_old_time_t = __kernel_long_t;
34pub type __kernel_time_t = __kernel_long_t;
35pub type __kernel_time64_t = crate::ctypes::c_longlong;
36pub type __kernel_clock_t = __kernel_long_t;
37pub type __kernel_timer_t = crate::ctypes::c_int;
38pub type __kernel_clockid_t = crate::ctypes::c_int;
39pub type __kernel_caddr_t = *mut crate::ctypes::c_char;
40pub type __kernel_uid16_t = crate::ctypes::c_ushort;
41pub type __kernel_gid16_t = crate::ctypes::c_ushort;
42pub type __le16 = __u16;
43pub type __be16 = __u16;
44pub type __le32 = __u32;
45pub type __be32 = __u32;
46pub type __le64 = __u64;
47pub type __be64 = __u64;
48pub type __sum16 = __u16;
49pub type __wsum = __u32;
50pub type __poll_t = crate::ctypes::c_uint;
51#[repr(C)]
52#[derive(Default)]
53pub struct __IncompleteArrayField<T>(::core::marker::PhantomData<T>, [T; 0]);
54#[repr(C)]
55#[derive(Debug)]
56pub struct sysinfo {
57pub uptime: __kernel_long_t,
58pub loads: [__kernel_ulong_t; 3usize],
59pub totalram: __kernel_ulong_t,
60pub freeram: __kernel_ulong_t,
61pub sharedram: __kernel_ulong_t,
62pub bufferram: __kernel_ulong_t,
63pub totalswap: __kernel_ulong_t,
64pub freeswap: __kernel_ulong_t,
65pub procs: __u16,
66pub pad: __u16,
67pub totalhigh: __kernel_ulong_t,
68pub freehigh: __kernel_ulong_t,
69pub mem_unit: __u32,
70pub _f: __IncompleteArrayField<crate::ctypes::c_char>,
71}
72#[repr(C)]
73#[derive(Debug, Copy, Clone)]
74pub struct oldold_utsname {
75pub sysname: [crate::ctypes::c_char; 9usize],
76pub nodename: [crate::ctypes::c_char; 9usize],
77pub release: [crate::ctypes::c_char; 9usize],
78pub version: [crate::ctypes::c_char; 9usize],
79pub machine: [crate::ctypes::c_char; 9usize],
80}
81#[repr(C)]
82#[derive(Debug, Copy, Clone)]
83pub struct old_utsname {
84pub sysname: [crate::ctypes::c_char; 65usize],
85pub nodename: [crate::ctypes::c_char; 65usize],
86pub release: [crate::ctypes::c_char; 65usize],
87pub version: [crate::ctypes::c_char; 65usize],
88pub machine: [crate::ctypes::c_char; 65usize],
89}
90#[repr(C)]
91#[derive(Debug, Copy, Clone)]
92pub struct new_utsname {
93pub sysname: [crate::ctypes::c_char; 65usize],
94pub nodename: [crate::ctypes::c_char; 65usize],
95pub release: [crate::ctypes::c_char; 65usize],
96pub version: [crate::ctypes::c_char; 65usize],
97pub machine: [crate::ctypes::c_char; 65usize],
98pub domainname: [crate::ctypes::c_char; 65usize],
99}
100pub const SI_LOAD_SHIFT: u32 = 16;
101pub const __OLD_UTS_LEN: u32 = 8;
102pub const __NEW_UTS_LEN: u32 = 64;
103impl<T> __IncompleteArrayField<T> {
104#[inline]
105pub const fn new() -> Self {
106__IncompleteArrayField(::core::marker::PhantomData, [])
107}
108#[inline]
109pub fn as_ptr(&self) -> *const T {
110self as *const _ as *const T
111}
112#[inline]
113pub fn as_mut_ptr(&mut self) -> *mut T {
114self as *mut _ as *mut T
115}
116#[inline]
117pub unsafe fn as_slice(&self, len: usize) -> &[T] {
118::core::slice::from_raw_parts(self.as_ptr(), len)
119}
120#[inline]
121pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
122::core::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
123}
124}
125impl<T> ::core::fmt::Debug for __IncompleteArrayField<T> {
126fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
127fmt.write_str(data:"__IncompleteArrayField")
128}
129}
130