Skip to content

build: avoid unsupported rlimit crate on fuchsia - #15831

Merged
cakebaker merged 1 commit into
uutils:mainfrom
xtqqczze:build/rlimit-redox
Oct 26, 2026
Merged

cakebaker merged 1 commit into
uutils:mainfrom
xtqqczze:build/rlimit-redox

Conversation

@xtqqczze

@xtqqczze xtqqczze commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

Skip compiling the rlimit crate on Fuchsia, as it fails to compile due to a missing setrlimit function in the platform-specific implementation.

The build fails with the following error:

error[E0425]: cannot find function `setrlimit` in module `C`
   --> rlimit-0.11.0/src/unix.rs:37:27
    |
 37 |     let ret = unsafe { C::setrlimit(resource.as_raw() as _, &rlim) };
    |                           ^^^^^^^^^ not found in `C`

Relates to: Nugine/rlimit#97.

@RenjiSann

Copy link
Copy Markdown
Collaborator

#[cfg(unix)]
fn get_rlimit() -> UResult<usize> {
use rlimit::{Resource, getrlimit};
let (rlim_cur, _) = getrlimit(Resource::NOFILE)
.map_err(|_| UUsageError::new(2, translate!("sort-failed-fetch-rlimit")))?;
usize::try_from(rlim_cur)
.map_err(|_| UUsageError::new(2, translate!("sort-failed-fetch-rlimit")))
}

Shouldn't this be updated as well (as well as those just below)

@xtqqczze xtqqczze changed the title build: skip compiling rlimit on fuchsia build: avoid unsupported rlimit crate on fuchsia Oct 26, 2026
@xtqqczze

Copy link
Copy Markdown
Collaborator Author

@RenjiSann We don't check fuchsia in CI, so I checked it locally; not sure there's any point in waiting for checks to complete.

@cakebaker
cakebaker merged commit 736703c into uutils:main Oct 26, 2026
194 checks passed
@cakebaker

Copy link
Copy Markdown
Contributor

Thanks!

@xtqqczze
xtqqczze deleted the build/rlimit-redox branch October 26, 2026 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants