Push definitions down a level to avoid macos

I guess the previous lint failure was about avoiding #[cfg], and doing
this instead.
This commit is contained in:
David Holroyd 2019-01-27 10:34:01 +00:00
parent 91639b6bc8
commit a4c25a99e4
3 changed files with 8 additions and 7 deletions

View File

@ -1245,6 +1245,10 @@ extern {
pub fn uselocale(loc: ::locale_t) -> ::locale_t; pub fn uselocale(loc: ::locale_t) -> ::locale_t;
pub fn utimensat(dirfd: ::c_int, path: *const ::c_char, pub fn utimensat(dirfd: ::c_int, path: *const ::c_char,
times: *const ::timespec, flag: ::c_int) -> ::c_int; times: *const ::timespec, flag: ::c_int) -> ::c_int;
pub fn sendmmsg(sockfd: ::c_int, msgvec: *mut ::mmsghdr, vlen: ::c_uint,
flags: ::c_int) -> ::c_int;
pub fn recvmmsg(sockfd: ::c_int, msgvec: *mut ::mmsghdr, vlen: ::c_uint,
flags: ::c_int, timeout: *mut ::timespec) -> ::c_int;
} }
#[link(name = "util")] #[link(name = "util")]

View File

@ -594,13 +594,6 @@ extern {
pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int) pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int)
-> ::ssize_t; -> ::ssize_t;
#[cfg_attr(not(target_os = "macos"))]
pub fn sendmmsg(sockfd: ::c_int, msgvec: *mut ::mmsghdr, vlen: ::c_uint,
flags: ::c_int) -> ::c_int;
#[cfg_attr(not(target_os = "macos"))]
pub fn recvmmsg(sockfd: ::c_int, msgvec: *mut ::mmsghdr, vlen: ::c_uint,
flags: ::c_int, timeout: *mut ::timespec) -> ::c_int;
pub fn sync(); pub fn sync();
#[cfg_attr(target_os = "solaris", link_name = "__posix_getgrgid_r")] #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrgid_r")]
pub fn getgrgid_r(uid: ::uid_t, pub fn getgrgid_r(uid: ::uid_t,

View File

@ -719,6 +719,10 @@ extern {
pub fn getdomainname(name: *mut ::c_char, len: ::size_t) -> ::c_int; pub fn getdomainname(name: *mut ::c_char, len: ::size_t) -> ::c_int;
pub fn setdomainname(name: *const ::c_char, len: ::size_t) -> ::c_int; pub fn setdomainname(name: *const ::c_char, len: ::size_t) -> ::c_int;
pub fn uname(buf: *mut ::utsname) -> ::c_int; pub fn uname(buf: *mut ::utsname) -> ::c_int;
pub fn sendmmsg(sockfd: ::c_int, msgvec: *mut ::mmsghdr, vlen: ::c_uint,
flags: ::c_int) -> ::c_int;
pub fn recvmmsg(sockfd: ::c_int, msgvec: *mut ::mmsghdr, vlen: ::c_uint,
flags: ::c_int, timeout: *mut ::timespec) -> ::c_int;
} }
cfg_if! { cfg_if! {