diff options
author | Alan Somers <asomers@gmail.com> | 2016-07-25 02:41:24 +0000 |
---|---|---|
committer | Philipp Matthias Schaefer <philipp.matthias.schaefer@posteo.de> | 2016-08-10 21:12:53 +0200 |
commit | bae5a373391eced579c7574fda942b9db4a55c3f (patch) | |
tree | 893458cbcf2759ef43f805618def664dc0120cd3 /src/unistd.rs | |
parent | cdecd1a9cc37263a27a86957fa9159c3597c83ca (diff) | |
download | nix-bae5a373391eced579c7574fda942b9db4a55c3f.zip |
Fix the sethostname binding on FreeBSD and DragonflyBSD
Diffstat (limited to 'src/unistd.rs')
-rw-r--r-- | src/unistd.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/unistd.rs b/src/unistd.rs index 6ab1d920..d4da60da 100644 --- a/src/unistd.rs +++ b/src/unistd.rs @@ -176,7 +176,10 @@ pub fn daemon(nochdir: bool, noclose: bool) -> Result<()> { pub fn sethostname(name: &[u8]) -> Result<()> { // Handle some differences in type of the len arg across platforms. cfg_if! { - if #[cfg(any(target_os = "macos", target_os = "ios"))] { + if #[cfg(any(target_os = "dragonfly", + target_os = "freebsd", + target_os = "ios", + target_os = "macos", ))] { type sethostname_len_t = c_int; } else { type sethostname_len_t = size_t; |