Fix sys/resource.h by avoiding stdint
This commit is contained in:
@@ -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 <bits/id-t.h> // for id_t from sys/types.h
|
||||
"""
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user