summaryrefslogtreecommitdiff
path: root/src/sys/socket.rs
diff options
context:
space:
mode:
authorCarl Lerche <me@carllerche.com>2014-10-02 15:42:03 -0700
committerCarl Lerche <me@carllerche.com>2014-10-02 15:42:03 -0700
commit67e6410805279cb46ddf69c2ddd3454b9f847c92 (patch)
treecd8685069b3f964a4b80dc490a029c0f23389204 /src/sys/socket.rs
parent05b3bb1e77b8d5c7a0a3321801782fad5edf80c4 (diff)
downloadnix-67e6410805279cb46ddf69c2ddd3454b9f847c92.zip
Track Rust master
Diffstat (limited to 'src/sys/socket.rs')
-rw-r--r--src/sys/socket.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/sys/socket.rs b/src/sys/socket.rs
index 4956b59b..edbbad97 100644
--- a/src/sys/socket.rs
+++ b/src/sys/socket.rs
@@ -97,8 +97,7 @@ mod consts {
pub static SO_BUSY_POLL: SockOpt = 46;
}
-#[cfg(target_os = "macos")]
-#[cfg(target_os = "ios")]
+#[cfg(any(target_os = "macos", target_os = "ios"))]
mod consts {
use libc::{c_int};
@@ -255,8 +254,7 @@ pub fn accept4(sockfd: Fd, flags: SockFlag) -> SysResult<Fd> {
Ok(res)
}
-#[cfg(target_os = "macos")]
-#[cfg(target_os = "ios")]
+#[cfg(any(target_os = "macos", target_os = "ios"))]
pub fn accept4(sockfd: Fd, flags: SockFlag) -> SysResult<Fd> {
let res = unsafe { ffi::accept(sockfd, ptr::null_mut(), ptr::null_mut()) };