Skip to content

Commit 442e7d2

Browse files
committed
Apply deprecation to linux uses of RLIM_NLIMITS
The deprecation for RLIM_NLIMITS was unintentionally removed in ad3f860.
1 parent f141a1a commit 442e7d2

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/unix/linux_like/android/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1559,6 +1559,7 @@ pub const RLIMIT_MSGQUEUE: ::c_int = 12;
15591559
pub const RLIMIT_NICE: ::c_int = 13;
15601560
pub const RLIMIT_RTPRIO: ::c_int = 14;
15611561

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

src/unix/linux_like/linux/arch/generic/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ cfg_if! {
257257
pub const RLIMIT_NICE: ::__rlimit_resource_t = 13;
258258
pub const RLIMIT_RTPRIO: ::__rlimit_resource_t = 14;
259259
pub const RLIMIT_RTTIME: ::__rlimit_resource_t = 15;
260+
#[allow(deprecated)]
260261
pub const RLIMIT_NLIMITS: ::__rlimit_resource_t = RLIM_NLIMITS;
261262

262263
} else if #[cfg(any(target_env = "musl", target_env = "ohos"))] {
@@ -277,16 +278,20 @@ cfg_if! {
277278
pub const RLIMIT_NICE: ::c_int = 13;
278279
pub const RLIMIT_RTPRIO: ::c_int = 14;
279280
pub const RLIMIT_RTTIME: ::c_int = 15;
281+
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
280282
pub const RLIM_NLIMITS: ::c_int = 15;
283+
#[allow(deprecated)]
281284
pub const RLIMIT_NLIMITS: ::c_int = RLIM_NLIMITS;
282285
}
283286
}
284287

285288
cfg_if! {
286289
if #[cfg(target_env = "gnu")] {
290+
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
287291
pub const RLIM_NLIMITS: ::__rlimit_resource_t = 16;
288292
}
289293
else if #[cfg(target_env = "uclibc")] {
294+
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
290295
pub const RLIM_NLIMITS: ::__rlimit_resource_t = 15;
291296
}
292297
}

0 commit comments

Comments
 (0)