summaryrefslogtreecommitdiff
path: root/src/sys/socket.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/sys/socket.rs')
-rw-r--r--src/sys/socket.rs20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/sys/socket.rs b/src/sys/socket.rs
index 8a99f708..bef64d7c 100644
--- a/src/sys/socket.rs
+++ b/src/sys/socket.rs
@@ -215,7 +215,6 @@ pub fn accept(sockfd: Fd) -> SysResult<Fd> {
Ok(res)
}
-#[cfg(target_os = "linux")]
pub fn accept4(sockfd: Fd, flags: SockFlag) -> SysResult<Fd> {
use libc::sockaddr;
@@ -254,25 +253,6 @@ pub fn accept4(sockfd: Fd, flags: SockFlag) -> SysResult<Fd> {
Ok(res)
}
-#[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()) };
-
- if res < 0 {
- return Err(SysError::last());
- }
-
- if flags.contains(SOCK_CLOEXEC) {
- try!(fcntl(res, F_SETFD(FD_CLOEXEC)));
- }
-
- if flags.contains(SOCK_NONBLOCK) {
- try!(fcntl(res, F_SETFL(O_NONBLOCK)));
- }
-
- Ok(res)
-}
-
pub fn connect(sockfd: Fd, addr: &SockAddr) -> SysResult<()> {
let res = unsafe {