Skip to content

Commit a4c25a9

Browse files
committed
Push definitions down a level to avoid macos
I guess the previous lint failure was about avoiding #[cfg], and doing this instead.
1 parent 91639b6 commit a4c25a9

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

src/unix/bsd/freebsdlike/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,6 +1245,10 @@ extern {
12451245
pub fn uselocale(loc: ::locale_t) -> ::locale_t;
12461246
pub fn utimensat(dirfd: ::c_int, path: *const ::c_char,
12471247
times: *const ::timespec, flag: ::c_int) -> ::c_int;
1248+
pub fn sendmmsg(sockfd: ::c_int, msgvec: *mut ::mmsghdr, vlen: ::c_uint,
1249+
flags: ::c_int) -> ::c_int;
1250+
pub fn recvmmsg(sockfd: ::c_int, msgvec: *mut ::mmsghdr, vlen: ::c_uint,
1251+
flags: ::c_int, timeout: *mut ::timespec) -> ::c_int;
12481252
}
12491253

12501254
#[link(name = "util")]

src/unix/bsd/mod.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -594,13 +594,6 @@ extern {
594594
pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int)
595595
-> ::ssize_t;
596596

597-
#[cfg_attr(not(target_os = "macos"))]
598-
pub fn sendmmsg(sockfd: ::c_int, msgvec: *mut ::mmsghdr, vlen: ::c_uint,
599-
flags: ::c_int) -> ::c_int;
600-
#[cfg_attr(not(target_os = "macos"))]
601-
pub fn recvmmsg(sockfd: ::c_int, msgvec: *mut ::mmsghdr, vlen: ::c_uint,
602-
flags: ::c_int, timeout: *mut ::timespec) -> ::c_int;
603-
604597
pub fn sync();
605598
#[cfg_attr(target_os = "solaris", link_name = "__posix_getgrgid_r")]
606599
pub fn getgrgid_r(uid: ::uid_t,

src/unix/bsd/netbsdlike/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,10 @@ extern {
719719
pub fn getdomainname(name: *mut ::c_char, len: ::size_t) -> ::c_int;
720720
pub fn setdomainname(name: *const ::c_char, len: ::size_t) -> ::c_int;
721721
pub fn uname(buf: *mut ::utsname) -> ::c_int;
722+
pub fn sendmmsg(sockfd: ::c_int, msgvec: *mut ::mmsghdr, vlen: ::c_uint,
723+
flags: ::c_int) -> ::c_int;
724+
pub fn recvmmsg(sockfd: ::c_int, msgvec: *mut ::mmsghdr, vlen: ::c_uint,
725+
flags: ::c_int, timeout: *mut ::timespec) -> ::c_int;
722726
}
723727

724728
cfg_if! {

0 commit comments

Comments
 (0)