Skip to content

Drop custom makedev implementation for Redox#1582

Merged
sunfishcode merged 2 commits intobytecodealliance:mainfrom
jackpot51:redox-makedev
Feb 15, 2026
Merged

Drop custom makedev implementation for Redox#1582
sunfishcode merged 2 commits intobytecodealliance:mainfrom
jackpot51:redox-makedev

Conversation

@jackpot51
Copy link
Contributor

These functions were added to libc 0.2.181 in rust-lang/libc#4963.

@xtqqczze
Copy link
Contributor

xtqqczze commented Feb 11, 2026

@sunfishcode Can we get this merged and a new rustix release ASAP, to fix compile errors:

error[E0308]: mismatched types
  --> src/backend/libc/fs/makedev.rs:53:5
   |
50 |   pub(crate) fn makedev(maj: u32, min: u32) -> Dev {
   |                                                --- expected `u64` because of return type
...
53 | /     ((i64::from(maj) & 0xffff_f000_i64) << 32)
54 | |         | ((i64::from(maj) & 0x0000_0fff_i64) << 8)
55 | |         | ((i64::from(min) & 0xffff_ff00_i64) << 12)
56 | |         | (i64::from(min) & 0x0000_00ff_i64)
   | |____________________________________________^ expected `u64`, found `i64`
   |
help: you can convert an `i64` to a `u64` and panic if the converted value doesn't fit
   |
53 ~     (((i64::from(maj) & 0xffff_f000_i64) << 32)
54 |         | ((i64::from(maj) & 0x0000_0fff_i64) << 8)
55 |         | ((i64::from(min) & 0xffff_ff00_i64) << 12)
56 ~         | (i64::from(min) & 0x0000_00ff_i64)).try_into().unwrap()
   |

For more information about this error, try `rustc --explain E0308`.
error: could not compile `rustix` (lib) due to 1 previous error

@jackpot51
Copy link
Contributor Author

@sunfishcode could you please take a look?

@xtqqczze

This comment was marked as resolved.

@sunfishcode sunfishcode merged commit 8bf15a0 into bytecodealliance:main Feb 15, 2026
40 of 52 checks passed
@sunfishcode
Copy link
Member

I'll publish a release soon.

@jackpot51
Copy link
Contributor Author

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.

3 participants