error when compiling nsh using cargo install
clemdemort opened this issue · 2 comments
clemdemort commented
Compiling nsh v0.4.2
error[E0061]: this function takes 0 arguments but 1 argument was supplied
--> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/nsh-0.4.2/src/prompt.rs:131:25
|
131 | let hostname_cstr = unistd::gethostname(&mut hostname_buf).expect("failed to get hostname");
| ^^^^^^^^^^^^^^^^^^^ ----------------- argument of type `&mut [u8; 128]` unexpected
|
note: function defined here
--> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.26.1/src/unistd.rs:1020:8
|
1020 | pub fn gethostname() -> Result<OsString> {
| ^^^^^^^^^^^
help: remove the extra argument
|
131 | let hostname_cstr = unistd::gethostname().expect("failed to get hostname");
|
metruzanca commented
I also got the same