Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ioctl is marked as "deprecated", should be replaced with nix #86

Closed
zonyitoo opened this issue Feb 18, 2024 · 1 comment
Closed

ioctl is marked as "deprecated", should be replaced with nix #86

zonyitoo opened this issue Feb 18, 2024 · 1 comment

Comments

@zonyitoo
Copy link
Contributor

zonyitoo commented Feb 18, 2024

https://crates.io/crates/ioctl

rust-tun/Cargo.toml

Lines 23 to 24 in e762c41

[target.'cfg(any(target_os = "linux", target_os = "macos"))'.dependencies]
ioctl = { version = "0.8", package = "ioctl-sys" }

The ioctl-sys package also seems to be abandoned.

@zonyitoo
Copy link
Contributor Author

The reason I want to replace this deprecate crate is that my Project build was failed on snapcraft with architecture ppc64el,

   Compiling ioctl-sys v0.8.0
:: error[E0432]: unresolved import `self::consts`
::   --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ioctl-sys-0.8.0/src/platform/linux.rs:61:15
::    |
:: 61 | pub use self::consts::*;
::    |               ^^^^^^ could not find `consts` in `self`
::
:: error[E0432]: unresolved import `this_arch_not_supported`
::   --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ioctl-sys-0.8.0/src/platform/linux.rs:37:5
::    |
:: 37 | use this_arch_not_supported;
::    |     ^^^^^^^^^^^^^^^^^^^^^^^ no `this_arch_not_supported` in the root
::
:: error[E0425]: cannot find value `SIZEBITS` in this scope
::   --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ioctl-sys-0.8.0/src/platform/mod.rs:28:39
::    |
:: 28 | pub const DIRSHIFT: u32 = SIZESHIFT + SIZEBITS as u32;
::    |                                       ^^^^^^^^ not found in this scope
::
:: error[E0425]: cannot find value `SIZEBITS` in this scope
::   --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ioctl-sys-0.8.0/src/platform/mod.rs:35:33
::    |
:: 35 | pub const SIZEMASK: u32 = (1 << SIZEBITS) - 1;
::    |                                 ^^^^^^^^ not found in this scope
::
:: error[E0425]: cannot find value `DIRBITS` in this scope
::   --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ioctl-sys-0.8.0/src/platform/mod.rs:37:32
::    |
:: 2  | pub const NRBITS: u32 = 8;
::    | -------------------------- similarly named constant `NRBITS` defined here
:: ...
:: 37 | pub const DIRMASK: u32 = (1 << DIRBITS) - 1;
::    |                                ^^^^^^^ help: a constant with a similar name exists: `NRBITS`
::
:: error[E0425]: cannot find value `WRITE` in this scope
::    --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ioctl-sys-0.8.0/src/platform/mod.rs:261:22
::     |
:: 261 | pub const IN: u32 = (WRITE as u32) << DIRSHIFT;
::     |                      ^^^^^ not found in this scope
::
:: error[E0425]: cannot find value `READ` in this scope
::    --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ioctl-sys-0.8.0/src/platform/mod.rs:263:23
::     |
:: 263 | pub const OUT: u32 = (READ as u32) << DIRSHIFT;
::     |                       ^^^^ not found in this scope
::
:: error[E0425]: cannot find value `READ` in this scope
::    --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ioctl-sys-0.8.0/src/platform/mod.rs:265:26
::     |
:: 265 | pub const INOUT: u32 = ((READ | WRITE) as u32) << DIRSHIFT;
::     |                          ^^^^ not found in this scope
::
:: error[E0425]: cannot find value `WRITE` in this scope
::    --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ioctl-sys-0.8.0/src/platform/mod.rs:265:33
::     |
:: 265 | pub const INOUT: u32 = ((READ | WRITE) as u32) << DIRSHIFT;
::     |                                 ^^^^^ not found in this scope
::

This is because ioctl-sys doesn't support ppc64el-* targets.

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 a pull request may close this issue.

2 participants