Skip to content

Commit

Permalink
Apply deprecation to linux uses of RLIM_NLIMITS
Browse files Browse the repository at this point in the history
The deprecation for RLIM_NLIMITS was unintentionally removed in
ad3f860.
  • Loading branch information
androm3da committed Sep 2, 2023
1 parent f141a1a commit 180d20b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/unix/linux_like/android/mod.rs
Expand Up @@ -1559,6 +1559,7 @@ pub const RLIMIT_MSGQUEUE: ::c_int = 12;
pub const RLIMIT_NICE: ::c_int = 13;
pub const RLIMIT_RTPRIO: ::c_int = 14;

#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
pub const RLIM_NLIMITS: ::c_int = 16;
pub const RLIM_INFINITY: ::rlim_t = !0;

Expand Down
3 changes: 3 additions & 0 deletions src/unix/linux_like/linux/arch/generic/mod.rs
Expand Up @@ -277,16 +277,19 @@ cfg_if! {
pub const RLIMIT_NICE: ::c_int = 13;
pub const RLIMIT_RTPRIO: ::c_int = 14;
pub const RLIMIT_RTTIME: ::c_int = 15;
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
pub const RLIM_NLIMITS: ::c_int = 15;
pub const RLIMIT_NLIMITS: ::c_int = RLIM_NLIMITS;
}
}

cfg_if! {
if #[cfg(target_env = "gnu")] {
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
pub const RLIM_NLIMITS: ::__rlimit_resource_t = 16;
}
else if #[cfg(target_env = "uclibc")] {
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
pub const RLIM_NLIMITS: ::__rlimit_resource_t = 15;
}
}
Expand Down

0 comments on commit 180d20b

Please sign in to comment.