You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whilst trying to build https://github.com/rustic-rs/rustic, under Haiku (as part of rustic-rs/rustic#1390), I encountered an issue related to nix's wrapper, for mknod(), where definitions for S_IFBLK, and S_IFCHR seem to be oversized, or missing:
error[E0308]: mismatched types
--> /boot/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustic_core-0.7.3/src/backend/local_destination.rs:663:65
|
663 | mknod(&filename, SFlag::S_IFBLK, Mode::empty(), device)
| ----- arguments to this function are incorrect ^^^^^^ expected `i32`, found `u64`
|
note: function defined here
--> /boot/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/nix-0.29.0/src/sys/stat.rs:156:8
|
156 | pub fn mknod<P: ?Sized + NixPath>(
| ^^^^^
help: you can convert a `u64` to an `i32` and panic if the converted value doesn't fit
|
663 | mknod(&filename, SFlag::S_IFBLK, Mode::empty(), device.try_into().unwrap())
| ++++++++++++++++++++
error[E0308]: mismatched types
--> /boot/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustic_core-0.7.3/src/backend/local_destination.rs:689:65
|
689 | mknod(&filename, SFlag::S_IFCHR, Mode::empty(), device)
| ----- arguments to this function are incorrect ^^^^^^ expected `i32`, found `u64`
|
note: function defined here
--> /boot/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/nix-0.29.0/src/sys/stat.rs:156:8
|
156 | pub fn mknod<P: ?Sized + NixPath>(
| ^^^^^
help: you can convert a `u64` to an `i32` and panic if the converted value doesn't fit
|
689 | mknod(&filename, SFlag::S_IFCHR, Mode::empty(), device.try_into().unwrap())
| ++++++++++++++++++++
Haiku's system headers seem to define the values to be:
However, I'm unsure of how the modes stuff work, since I'm unfamiliar with the "nix" Crate codebase, so other than probing at a Haiku system, and testing things, I'm short of ideas, for actually fixing this. (I'm also unsure, of if they're always 64-bit wide, on 32-bit Haiku systems).
The text was updated successfully, but these errors were encountered:
Whilst trying to build https://github.com/rustic-rs/rustic, under Haiku (as part of rustic-rs/rustic#1390), I encountered an issue related to nix's wrapper, for
mknod()
, where definitions for S_IFBLK, and S_IFCHR seem to be oversized, or missing:Haiku's system headers seem to define the values to be:
However, I'm unsure of how the modes stuff work, since I'm unfamiliar with the "nix" Crate codebase, so other than probing at a Haiku system, and testing things, I'm short of ideas, for actually fixing this. (I'm also unsure, of if they're always 64-bit wide, on 32-bit Haiku systems).
The text was updated successfully, but these errors were encountered: