Fix c_long, c_ulong and sysinfo for linux x32
This commit is contained in:
parent
2ca5bc5275
commit
968bce4ed4
@ -1,7 +1,15 @@
|
||||
//! 64-bit specific definitions for linux-like values
|
||||
|
||||
pub type c_long = i64;
|
||||
pub type c_ulong = u64;
|
||||
cfg_if! {
|
||||
if #[cfg(target_pointer_width = "32")] {
|
||||
pub type c_long = i32;
|
||||
pub type c_ulong = u32;
|
||||
} else {
|
||||
pub type c_long = i64;
|
||||
pub type c_ulong = u64;
|
||||
}
|
||||
}
|
||||
|
||||
pub type clock_t = i64;
|
||||
pub type time_t = i64;
|
||||
pub type ino_t = u64;
|
||||
@ -15,18 +23,18 @@ s! {
|
||||
}
|
||||
|
||||
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 uptime: i64,
|
||||
pub loads: [u64; 3],
|
||||
pub totalram: u64,
|
||||
pub freeram: u64,
|
||||
pub sharedram: u64,
|
||||
pub bufferram: u64,
|
||||
pub totalswap: u64,
|
||||
pub freeswap: u64,
|
||||
pub procs: ::c_ushort,
|
||||
pub pad: ::c_ushort,
|
||||
pub totalhigh: ::c_ulong,
|
||||
pub freehigh: ::c_ulong,
|
||||
pub totalhigh: u64,
|
||||
pub freehigh: u64,
|
||||
pub mem_unit: ::c_uint,
|
||||
pub _f: [::c_char; 0],
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user