devela::_dep::nc

Function sethostname

pub unsafe fn sethostname<P>(name: P) -> Result<(), i32> 
where P: AsRef<Path>,
Available on crate feature dep_nc only.
Expand description

Set hostname.

§Exampless

let name = "rust-machine";
let ret = unsafe { nc::sethostname(name) };
assert!(ret.is_err());
assert_eq!(ret, Err(nc::EPERM));