diff --git a/src/header/sys_resource/cbindgen.toml b/src/header/sys_resource/cbindgen.toml index 3d0766cec4..43b32e07c4 100644 --- a/src/header/sys_resource/cbindgen.toml +++ b/src/header/sys_resource/cbindgen.toml @@ -1,7 +1,5 @@ -# stdint.h needed for uint64_t due to rlim_t and constants u64 -# TODO POSIX says rlim_t can be unsigned int but including stdint.h is considered namespace pollution # sys/time.h brings in sys/select.h which brings in bits/timeval.h -sys_includes = ["stdint.h", "sys/time.h"] +sys_includes = ["sys/time.h"] after_includes = """ #include // for id_t from sys/types.h """ diff --git a/src/header/sys_resource/mod.rs b/src/header/sys_resource/mod.rs index 93714bae6f..83bbbab2e8 100644 --- a/src/header/sys_resource/mod.rs +++ b/src/header/sys_resource/mod.rs @@ -8,7 +8,7 @@ use crate::{ out::Out, platform::{ Pal, Sys, - types::{c_int, c_long, id_t}, + types::{c_int, c_long, c_ulonglong, id_t}, }, }; @@ -38,7 +38,7 @@ pub const RLIMIT_NICE: c_int = 13; pub const RLIMIT_RTPRIO: c_int = 14; pub const RLIMIT_NLIMITS: c_int = 15; -pub type rlim_t = u64; +pub type rlim_t = c_ulonglong; #[repr(C)] pub struct rlimit {