From 7adbc75876d8d541758afbf356ecad739e037748 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Marie?= Date: Fri, 16 Sep 2016 13:45:10 +0200 Subject: [PATCH] define `sethostname` under OpenBSD and Bitrig factorize the definition with NetBSD --- src/unix/bsd/netbsdlike/mod.rs | 1 + src/unix/bsd/netbsdlike/netbsd.rs | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unix/bsd/netbsdlike/mod.rs b/src/unix/bsd/netbsdlike/mod.rs index 9631f8a491549..9c5aef9db863b 100644 --- a/src/unix/bsd/netbsdlike/mod.rs +++ b/src/unix/bsd/netbsdlike/mod.rs @@ -529,6 +529,7 @@ extern { abstime: *const ::timespec) -> ::c_int; pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t, clock_id: clockid_t) -> ::c_int; + pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int; } cfg_if! { diff --git a/src/unix/bsd/netbsdlike/netbsd.rs b/src/unix/bsd/netbsdlike/netbsd.rs index 72101f0ace197..6edfb08d5ec1e 100644 --- a/src/unix/bsd/netbsdlike/netbsd.rs +++ b/src/unix/bsd/netbsdlike/netbsd.rs @@ -588,7 +588,6 @@ extern { pid: ::pid_t, addr: *mut ::c_void, data: ::c_int) -> ::c_int; - pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int; pub fn pthread_setname_np(t: ::pthread_t, name: *const ::c_char, arg: *mut ::c_void) -> ::c_int;