Skip to content

Drop custom makedev implementation for Redox#1582

Open
jackpot51 wants to merge 2 commits intobytecodealliance:mainfrom
jackpot51:redox-makedev
Open

Drop custom makedev implementation for Redox#1582
jackpot51 wants to merge 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
Copy link
Contributor

Blocked by #1584

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.

2 participants