Skip to content

Conversation

@jackpot51
Copy link
Contributor

Description

This adds the makedev, major, and minor functions and fixes the type of dev_t on Redox. These functions are defines in the Redox libc, and are identical to the Linux implementations.

Sources

makedev, major, and minor are defined here: https://gitlab.redox-os.org/redox-os/relibc/-/blob/master/include/sys/sysmacros.h?ref_type=heads. These definitions are directly from musl, which matches the const fns in the libc crate.

The type of dev_t can be seen here: https://gitlab.redox-os.org/redox-os/relibc/-/blob/master/src/platform/types.rs?ref_type=heads#L66. It was recently adjusted to fix a discrepancy between 32-bit and 64-bit Redox systems.

Checklist

  • Relevant tests in libc-test/semver have been updated
  • No placeholder or unstable values like *LAST or *MAX are
    included (see #3131)
  • Tested locally (cd libc-test && cargo test --target mytarget);
    especially relevant for platforms that may not be checked in CI

Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

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

Thanks!

@JohnTitor JohnTitor added this pull request to the merge queue Jan 17, 2026
Merged via the queue into rust-lang:main with commit 76e737e Jan 17, 2026
50 of 51 checks passed
@jackpot51
Copy link
Contributor Author

Can this be backported to 0.2 and released?

@JohnTitor
Copy link
Member

Sure!

@JohnTitor JohnTitor added the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Jan 17, 2026
@jackpot51 jackpot51 deleted the redox-dev-t branch January 19, 2026 16:22
@jackpot51 jackpot51 restored the redox-dev-t branch January 19, 2026 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-redox O-unix stable-nominated This PR should be considered for cherry-pick to libc's stable release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants