Fix sys/resource.h by avoiding stdint

This commit is contained in:
Wildan M
2026-05-18 15:29:44 +07:00
parent 96f63879c7
commit a222fe84bf
2 changed files with 3 additions and 5 deletions
+1 -3
View File
@@ -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
"""
+2 -2
View File
@@ -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 {