ulimit: add illumos to platforms missing MEMLOCK/NPROC limits

Part of #12410
This commit is contained in:
Liam Snow
2026-02-03 18:06:39 +00:00
committed by Johannes Altmanninger
parent 38513de954
commit 5b39d1fc6a

View File

@@ -24,7 +24,7 @@ pub mod common {
pub const DATA: libc::c_int = libc::RLIMIT_DATA as _;
pub const FSIZE: libc::c_int = libc::RLIMIT_FSIZE as _;
cfg_if!(
if #[cfg(cygwin)] {
if #[cfg(any(cygwin, target_os = "illumos"))] {
pub const MEMLOCK: libc::c_int = -1;
} else {
pub const MEMLOCK: libc::c_int = libc::RLIMIT_MEMLOCK as _;
@@ -34,7 +34,7 @@ pub mod common {
pub const STACK: libc::c_int = libc::RLIMIT_STACK as _;
pub const CPU: libc::c_int = libc::RLIMIT_CPU as _;
cfg_if!(
if #[cfg(cygwin)] {
if #[cfg(any(cygwin, target_os = "illumos"))] {
pub const NPROC: libc::c_int = -1;
} else {
pub const NPROC: libc::c_int = libc::RLIMIT_NPROC as _;