Skip to content

Commit e183f93

Browse files
authored
Auto merge of rust-lang#399 - semarie:sethostname, r=alexcrichton
define `sethostname` under OpenBSD and Bitrig factorize the definition with NetBSD
2 parents d8a7046 + 7adbc75 commit e183f93

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

src/unix/bsd/netbsdlike/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,7 @@ extern {
529529
abstime: *const ::timespec) -> ::c_int;
530530
pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t,
531531
clock_id: clockid_t) -> ::c_int;
532+
pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int;
532533
}
533534

534535
cfg_if! {

src/unix/bsd/netbsdlike/netbsd.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,6 @@ extern {
588588
pid: ::pid_t,
589589
addr: *mut ::c_void,
590590
data: ::c_int) -> ::c_int;
591-
pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int;
592591
pub fn pthread_setname_np(t: ::pthread_t,
593592
name: *const ::c_char,
594593
arg: *mut ::c_void) -> ::c_int;

0 commit comments

Comments
 (0)