Skip to content

Commit bff3a1d

Browse files
xbjfktgross35
authored andcommitted
musl: update RLIM_NLIMITS
This reflects upstream commit 2507e7f. This should be safe to change as this has been marked deprecated to warn people it will change across OS versions since 0.2.64 (>5 years ago) (backport <rust-lang#4443>) (cherry picked from commit 5d24ad2)
1 parent ae4921a commit bff3a1d

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

libc-test/build.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4339,6 +4339,10 @@ fn test_linux(target: &str) {
43394339
if old_musl && (riscv64 || x86_64) && name == "O_LARGEFILE" {
43404340
return true;
43414341
}
4342+
// Values changed in newer musl versions
4343+
if old_musl && name == "RLIM_NLIMITS" {
4344+
return true;
4345+
}
43424346
}
43434347
match name {
43444348
// These constants are not available if gnu headers have been included

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -357,9 +357,6 @@ cfg_if! {
357357
pub const RLIMIT_RTPRIO: c_int = 14;
358358
pub const RLIMIT_RTTIME: c_int = 15;
359359
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
360-
#[cfg(not(target_arch = "loongarch64"))]
361-
pub const RLIM_NLIMITS: c_int = 15;
362-
#[cfg(target_arch = "loongarch64")]
363360
pub const RLIM_NLIMITS: c_int = 16;
364361
#[allow(deprecated)]
365362
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ cfg_if! {
349349
pub const RLIMIT_RTPRIO: c_int = 14;
350350
pub const RLIMIT_RTTIME: c_int = 15;
351351
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
352-
pub const RLIM_NLIMITS: c_int = 15;
352+
pub const RLIM_NLIMITS: c_int = 16;
353353
#[allow(deprecated)]
354354
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
355355
pub const RLIMIT_NLIMITS: c_int = RLIM_NLIMITS;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ cfg_if! {
330330
pub const RLIMIT_RTPRIO: c_int = 14;
331331
pub const RLIMIT_RTTIME: c_int = 15;
332332
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
333-
pub const RLIM_NLIMITS: c_int = 15;
333+
pub const RLIM_NLIMITS: c_int = 16;
334334
#[allow(deprecated)]
335335
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
336336
pub const RLIMIT_NLIMITS: c_int = RLIM_NLIMITS;

0 commit comments

Comments
 (0)