Skip to content

uucore, uptime: replace unsafe libc::clock_gettime by rustix#13291

Merged
cakebaker merged 3 commits into
uutils:mainfrom
Devel08:fix-issue-13287
Jul 6, 2026
Merged

uucore, uptime: replace unsafe libc::clock_gettime by rustix#13291
cakebaker merged 3 commits into
uutils:mainfrom
Devel08:fix-issue-13287

Conversation

@Devel08

@Devel08 Devel08 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

this PR closes #13287
this pr replaces libc with rustix for get_uptime() for openbsd

///
/// Returns a UResult with the uptime in seconds if successful, otherwise an UptimeError.
#[cfg(unix)]
#[cfg(not(target_os = "openbsd"))]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should do same things for other platforms to avoid failure under masked /proc.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened #13292

@Devel08 Devel08 marked this pull request as ready for review July 6, 2026 13:10
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/misc/io-errors (fails in this run but passes in the 'main' branch)
Note: The gnu test tests/rm/many-dir-entries-vs-OOM is now being skipped but was previously passing.
Congrats! The gnu test tests/tail/tail-n0f is now passing!
Skip an intermittent issue tests/pr/bounded-memory (was skipped on 'main', now failing)

@cakebaker cakebaker merged commit dad997e into uutils:main Jul 6, 2026
179 checks passed
@cakebaker

Copy link
Copy Markdown
Contributor

Thanks!

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.

uucore, uptime: replace unsafe libc::clock_gettime by rustix

3 participants