summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2017-03-20 21:24:02 +0100
committerJörg Thalheim <joerg@thalheim.io>2017-07-07 00:00:38 +0100
commitc8267bc3a2daae343ada151af2218fbcb7ca48bf (patch)
treef340ce715d818ec2fccb9372cb499bc6ea96729d
parentaead75797781840aadea45f5314824f06c330741 (diff)
downloadnix-c8267bc3a2daae343ada151af2218fbcb7ca48bf.zip
README.md: update gethostname api
-rw-r--r--README.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/README.md b/README.md
index cf03cac8..344b4eef 100644
--- a/README.md
+++ b/README.md
@@ -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