Merged master
This commit is contained in:
commit
dc98bd0fd4
@ -163,6 +163,7 @@ fn main() {
|
||||
cfg.header("sys/sendfile.h");
|
||||
cfg.header("sys/vfs.h");
|
||||
cfg.header("sys/syscall.h");
|
||||
cfg.header("sys/sysinfo.h");
|
||||
if !musl {
|
||||
cfg.header("linux/netlink.h");
|
||||
cfg.header("linux/magic.h");
|
||||
|
@ -102,6 +102,23 @@ s! {
|
||||
pub f_flags: ::uint32_t,
|
||||
pub f_spare: [::uint32_t; 4],
|
||||
}
|
||||
|
||||
pub struct sysinfo {
|
||||
pub uptime: ::c_long,
|
||||
pub loads: [::c_ulong; 3],
|
||||
pub totalram: ::c_ulong,
|
||||
pub freeram: ::c_ulong,
|
||||
pub sharedram: ::c_ulong,
|
||||
pub bufferram: ::c_ulong,
|
||||
pub totalswap: ::c_ulong,
|
||||
pub freeswap: ::c_ulong,
|
||||
pub procs: ::c_ushort,
|
||||
pub pad: ::c_ushort,
|
||||
pub totalhigh: ::c_ulong,
|
||||
pub freehigh: ::c_ulong,
|
||||
pub mem_unit: ::c_uint,
|
||||
pub _f: [::c_char; 8],
|
||||
}
|
||||
}
|
||||
|
||||
pub const SYS_gettid: ::c_long = 224;
|
||||
|
@ -112,6 +112,23 @@ s! {
|
||||
pub f_flags: ::uint64_t,
|
||||
pub f_spare: [::uint64_t; 4],
|
||||
}
|
||||
|
||||
pub struct sysinfo {
|
||||
pub uptime: ::c_long,
|
||||
pub loads: [::c_ulong; 3],
|
||||
pub totalram: ::c_ulong,
|
||||
pub freeram: ::c_ulong,
|
||||
pub sharedram: ::c_ulong,
|
||||
pub bufferram: ::c_ulong,
|
||||
pub totalswap: ::c_ulong,
|
||||
pub freeswap: ::c_ulong,
|
||||
pub procs: ::c_ushort,
|
||||
pub pad: ::c_ushort,
|
||||
pub totalhigh: ::c_ulong,
|
||||
pub freehigh: ::c_ulong,
|
||||
pub mem_unit: ::c_uint,
|
||||
pub _f: [::c_char; 0],
|
||||
}
|
||||
}
|
||||
|
||||
pub const SYS_gettid: ::c_long = 178;
|
||||
|
@ -172,6 +172,23 @@ s! {
|
||||
pub l_pid: ::pid_t,
|
||||
pad: [::c_long; 4],
|
||||
}
|
||||
|
||||
pub struct sysinfo {
|
||||
pub uptime: ::c_long,
|
||||
pub loads: [::c_ulong; 3],
|
||||
pub totalram: ::c_ulong,
|
||||
pub freeram: ::c_ulong,
|
||||
pub sharedram: ::c_ulong,
|
||||
pub bufferram: ::c_ulong,
|
||||
pub totalswap: ::c_ulong,
|
||||
pub freeswap: ::c_ulong,
|
||||
pub procs: ::c_ushort,
|
||||
pub pad: ::c_ushort,
|
||||
pub totalhigh: ::c_ulong,
|
||||
pub freehigh: ::c_ulong,
|
||||
pub mem_unit: ::c_uint,
|
||||
pub _f: [::c_char; 8],
|
||||
}
|
||||
}
|
||||
|
||||
pub const BUFSIZ: ::c_uint = 8192;
|
||||
|
@ -56,6 +56,23 @@ s! {
|
||||
pub l_len: ::off_t,
|
||||
pub l_pid: ::pid_t,
|
||||
}
|
||||
|
||||
pub struct sysinfo {
|
||||
pub uptime: ::c_ulong,
|
||||
pub loads: [::c_ulong; 3],
|
||||
pub totalram: ::c_ulong,
|
||||
pub freeram: ::c_ulong,
|
||||
pub sharedram: ::c_ulong,
|
||||
pub bufferram: ::c_ulong,
|
||||
pub totalswap: ::c_ulong,
|
||||
pub freeswap: ::c_ulong,
|
||||
pub procs: ::c_ushort,
|
||||
pub pad: ::c_ushort,
|
||||
pub totalhigh: ::c_ulong,
|
||||
pub freehigh: ::c_ulong,
|
||||
pub mem_unit: ::c_uint,
|
||||
pub __reserved: [::c_char; 256],
|
||||
}
|
||||
}
|
||||
|
||||
pub const BUFSIZ: ::c_uint = 1024;
|
||||
|
@ -66,6 +66,23 @@ s! {
|
||||
pub struct sigset_t {
|
||||
__val: [::c_ulong; 32],
|
||||
}
|
||||
|
||||
pub struct sysinfo {
|
||||
pub uptime: ::c_long,
|
||||
pub loads: [::c_ulong; 3],
|
||||
pub totalram: ::c_ulong,
|
||||
pub freeram: ::c_ulong,
|
||||
pub sharedram: ::c_ulong,
|
||||
pub bufferram: ::c_ulong,
|
||||
pub totalswap: ::c_ulong,
|
||||
pub freeswap: ::c_ulong,
|
||||
pub procs: ::c_ushort,
|
||||
pub pad: ::c_ushort,
|
||||
pub totalhigh: ::c_ulong,
|
||||
pub freehigh: ::c_ulong,
|
||||
pub mem_unit: ::c_uint,
|
||||
pub _f: [::c_char; 8],
|
||||
}
|
||||
}
|
||||
|
||||
pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24;
|
||||
|
@ -14,6 +14,23 @@ s! {
|
||||
pub struct sigset_t {
|
||||
__val: [::c_ulong; 16],
|
||||
}
|
||||
|
||||
pub struct sysinfo {
|
||||
pub uptime: ::c_long,
|
||||
pub loads: [::c_ulong; 3],
|
||||
pub totalram: ::c_ulong,
|
||||
pub freeram: ::c_ulong,
|
||||
pub sharedram: ::c_ulong,
|
||||
pub bufferram: ::c_ulong,
|
||||
pub totalswap: ::c_ulong,
|
||||
pub freeswap: ::c_ulong,
|
||||
pub procs: ::c_ushort,
|
||||
pub pad: ::c_ushort,
|
||||
pub totalhigh: ::c_ulong,
|
||||
pub freehigh: ::c_ulong,
|
||||
pub mem_unit: ::c_uint,
|
||||
pub _f: [::c_char; 0],
|
||||
}
|
||||
}
|
||||
|
||||
pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
|
||||
|
@ -652,6 +652,8 @@ pub const LOG_PERROR: ::c_int = 0x20;
|
||||
|
||||
pub const PIPE_BUF: usize = 4096;
|
||||
|
||||
pub const SI_LOAD_SHIFT: ::c_uint = 16;
|
||||
|
||||
f! {
|
||||
pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () {
|
||||
let fd = fd as usize;
|
||||
@ -800,6 +802,7 @@ extern {
|
||||
pub fn setrlimit64(resource: ::c_int, rlim: *const rlimit64) -> ::c_int;
|
||||
pub fn stat64(path: *const c_char, buf: *mut stat64) -> ::c_int;
|
||||
pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int;
|
||||
pub fn sysinfo (info: *mut ::sysinfo) -> ::c_int;
|
||||
pub fn sched_getcpu() -> ::c_int;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user