Skip to content

Fix the fs_at crate

error[E0432]: unresolved import `libc::mkdirat`
  --> /home/ribbon/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fs_at-0.1.10/src/unix.rs:29:19
   |
29 | use libc::{c_int, mkdirat, mode_t};
   |                   ^^^^^^^
   |                   |
   |                   no `mkdirat` in the root
   |                   help: a similar name exists in the module: `mkdir`

error[E0432]: unresolved import `libc::openat64`
  --> /home/ribbon/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fs_at-0.1.10/src/unix.rs:24:13
   |
24 |         use libc::openat64;
   |             ^^^^^^^^^^^^^^ no `openat64` in the root

error[E0425]: cannot find value `O_NOCTTY` in crate `libc`
   --> /home/ribbon/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fs_at-0.1.10/src/unix.rs:114:52
    |
114 |         let common_flags = libc::O_CLOEXEC | libc::O_NOCTTY;
    |                                                    ^^^^^^^^ not found in `libc`

error[E0425]: cannot find value `O_NOCTTY` in crate `libc`
   --> /home/ribbon/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fs_at-0.1.10/src/unix.rs:134:79
    |
134 | ...CLOEXEC | libc::O_NOCTTY;
    |                    ^^^^^^^^ not found in `libc`

error[E0425]: cannot find value `O_NOCTTY` in crate `libc`
   --> /home/ribbon/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fs_at-0.1.10/src/unix.rs:149:88
    |
149 | ...CLOEXEC | libc::O_NOCTTY;
    |                    ^^^^^^^^ not found in `libc`

error[E0425]: cannot find value `AT_REMOVEDIR` in crate `libc`
   --> /home/ribbon/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fs_at-0.1.10/src/unix.rs:227:35
    |
227 |         self.unlinkat(d, p, libc::AT_REMOVEDIR)
    |                                   ^^^^^^^^^^^^ not found in `libc`

error[E0425]: cannot find function `fdopendir` in crate `libc`
   --> /home/ribbon/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fs_at-0.1.10/src/unix.rs:327:46
    |
327 | ...::new(unsafe { libc::fdopendir(new_fd) }).ok_or_else(|| {
    |                         ^^^^^^^^^ help: a function with a similar name exists: `opendir`
    |
   ::: /home/ribbon/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.151/src/unix/mod.rs:768:5
    |
768 |     pub fn opendir(dirname: *const c_char) -> *mut ::DIR;
    |     ---------------------------------------------------- similarly named function `opendir` defined here

Some errors have detailed explanations: E0425, E0432.
For more information about an error, try `rustc --explain E0425`.
   Compiling clap v2.34.0
error: could not compile `fs_at` (lib) due to 7 previous errors