From 35526765191764217158f1940cc64ef7c238e2da Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Fri, 16 Aug 2024 01:53:54 -0500 Subject: [PATCH] Revert "openbsd/netbsd factorise getnameinfo." This reverts commit 66cdb6bd9612387d2926709058619afd4e47b7a5. The change broke builds for OpenBSD. See discussion at . `main` version: . --- src/unix/bsd/netbsdlike/mod.rs | 11 ----------- src/unix/bsd/netbsdlike/netbsd/mod.rs | 9 +++++++++ src/unix/bsd/netbsdlike/openbsd/mod.rs | 9 +++++++++ 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/src/unix/bsd/netbsdlike/mod.rs b/src/unix/bsd/netbsdlike/mod.rs index eec8f39b5c858..e92cf65940141 100644 --- a/src/unix/bsd/netbsdlike/mod.rs +++ b/src/unix/bsd/netbsdlike/mod.rs @@ -706,17 +706,6 @@ extern "C" { dev: dev_t, ) -> ::c_int; pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char, mode: ::mode_t) -> ::c_int; - - pub fn getnameinfo( - sa: *const ::sockaddr, - salen: ::socklen_t, - host: *mut ::c_char, - hostlen: ::socklen_t, - serv: *mut ::c_char, - servlen: ::socklen_t, - flags: ::c_int, - ) -> ::c_int; - pub fn sem_timedwait(sem: *mut sem_t, abstime: *const ::timespec) -> ::c_int; pub fn sem_getvalue(sem: *mut sem_t, sval: *mut ::c_int) -> ::c_int; pub fn pthread_condattr_setclock( diff --git a/src/unix/bsd/netbsdlike/netbsd/mod.rs b/src/unix/bsd/netbsdlike/netbsd/mod.rs index 28456d68bebd8..7c63db8e0e205 100644 --- a/src/unix/bsd/netbsdlike/netbsd/mod.rs +++ b/src/unix/bsd/netbsdlike/netbsd/mod.rs @@ -2648,6 +2648,15 @@ extern "C" { pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int; #[link_name = "__gettimeofday50"] pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::c_void) -> ::c_int; + pub fn getnameinfo( + sa: *const ::sockaddr, + salen: ::socklen_t, + host: *mut ::c_char, + hostlen: ::socklen_t, + serv: *mut ::c_char, + servlen: ::socklen_t, + flags: ::c_int, + ) -> ::c_int; pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) -> ::c_int; pub fn sysctl( name: *const ::c_int, diff --git a/src/unix/bsd/netbsdlike/openbsd/mod.rs b/src/unix/bsd/netbsdlike/openbsd/mod.rs index 1809384e4b6a3..8f470aff9a357 100644 --- a/src/unix/bsd/netbsdlike/openbsd/mod.rs +++ b/src/unix/bsd/netbsdlike/openbsd/mod.rs @@ -2018,6 +2018,15 @@ extern "C" { atflag: ::c_int, ) -> ::c_int; pub fn dirfd(dirp: *mut ::DIR) -> ::c_int; + pub fn getnameinfo( + sa: *const ::sockaddr, + salen: ::socklen_t, + host: *mut ::c_char, + hostlen: ::size_t, + serv: *mut ::c_char, + servlen: ::size_t, + flags: ::c_int, + ) -> ::c_int; pub fn getresgid(rgid: *mut ::gid_t, egid: *mut ::gid_t, sgid: *mut ::gid_t) -> ::c_int; pub fn getresuid(ruid: *mut ::uid_t, euid: *mut ::uid_t, suid: *mut ::uid_t) -> ::c_int; pub fn kevent(