Function sethostname
pub unsafe fn sethostname<P>(name: P) -> Result<(), i32> ⓘ
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));