From 1d961f7cc63c3aa05f7184401bc48f85a970c4b9 Mon Sep 17 00:00:00 2001 From: Joshua Issac Date: Sat, 14 Feb 2026 17:02:40 +0000 Subject: [PATCH] fix: make nix sys::resource work on Solaris (#2742) * Solaris patch to enable sys/resource * changelog --- changelog/2742.fixed.md | 1 + src/sys/mod.rs | 1 - src/sys/resource.rs | 4 ++-- 3 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 changelog/2742.fixed.md diff --git a/changelog/2742.fixed.md b/changelog/2742.fixed.md new file mode 100644 index 0000000000..e1a27ad4cc --- /dev/null +++ b/changelog/2742.fixed.md @@ -0,0 +1 @@ +Fixed sys::resource support on Solaris targets. diff --git a/src/sys/mod.rs b/src/sys/mod.rs index b52f53ef2e..2aa10affdb 100644 --- a/src/sys/mod.rs +++ b/src/sys/mod.rs @@ -96,7 +96,6 @@ feature! { #[cfg(not(any( target_os = "redox", target_os = "fuchsia", - target_os = "solaris", target_os = "haiku" )))] feature! { diff --git a/src/sys/resource.rs b/src/sys/resource.rs index 4868eac643..759fd577e0 100644 --- a/src/sys/resource.rs +++ b/src/sys/resource.rs @@ -17,9 +17,9 @@ cfg_if! { use libc::{__rlimit_resource_t, rlimit}; } else if #[cfg(any( bsd, + solarish, target_os = "android", target_os = "aix", - target_os = "illumos", all(target_os = "linux", not(target_env = "gnu")), target_os = "cygwin" ))]{ @@ -49,9 +49,9 @@ libc_enum! { ), repr(u32))] #[cfg_attr(any( bsd, + solarish, target_os = "android", target_os = "aix", - target_os = "illumos", all(target_os = "linux", not(any(target_env = "gnu", target_env = "uclibc"))), target_os = "cygwin" ), repr(i32))]