diff options
author | Jörg Thalheim <joerg@thalheim.io> | 2017-03-20 21:24:02 +0100 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2017-07-07 00:00:38 +0100 |
commit | c8267bc3a2daae343ada151af2218fbcb7ca48bf (patch) | |
tree | f340ce715d818ec2fccb9372cb499bc6ea96729d | |
parent | aead75797781840aadea45f5314824f06c330741 (diff) | |
download | nix-c8267bc3a2daae343ada151af2218fbcb7ca48bf.zip |
README.md: update gethostname api
-rw-r--r-- | README.md | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -26,8 +26,8 @@ call: // libc api (unsafe, requires handling return code/errno) pub unsafe extern fn gethostname(name: *mut c_char, len: size_t) -> c_int; -// nix api (returns a nix::Result) -pub fn gethostname(name: &mut [u8]) -> Result<()>; +// nix api (returns a nix::Result<CStr>) +pub fn gethostname<'a>(buffer: &'a mut [u8]) -> Result<&'a CStr>; ``` ## Supported Platforms |