Skip to content

Commit

Permalink
README.md: update gethostname api
Browse files Browse the repository at this point in the history
  • Loading branch information
Mic92 committed Mar 25, 2017
1 parent ff453e5 commit 818a5e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
```

## Requirements
Expand Down

0 comments on commit 818a5e8

Please sign in to comment.