Comment out functions not implemented by Redox
This commit is contained in:
@@ -3,6 +3,58 @@ use super::super::PalSocket;
|
||||
use super::{e, Sys};
|
||||
use header::sys_socket::{sockaddr, socklen_t};
|
||||
|
||||
impl Sys {
|
||||
fn getsockopt(
|
||||
socket: c_int,
|
||||
level: c_int,
|
||||
option_name: c_int,
|
||||
option_value: *mut c_void,
|
||||
option_len: *mut socklen_t,
|
||||
) -> c_int {
|
||||
e(unsafe {
|
||||
syscall!(
|
||||
GETSOCKOPT,
|
||||
socket,
|
||||
level,
|
||||
option_name,
|
||||
option_value,
|
||||
option_len
|
||||
)
|
||||
}) as c_int
|
||||
}
|
||||
|
||||
fn listen(socket: c_int, backlog: c_int) -> c_int {
|
||||
e(unsafe { syscall!(LISTEN, socket, backlog) }) as c_int
|
||||
}
|
||||
|
||||
fn setsockopt(
|
||||
socket: c_int,
|
||||
level: c_int,
|
||||
option_name: c_int,
|
||||
option_value: *const c_void,
|
||||
option_len: socklen_t,
|
||||
) -> c_int {
|
||||
e(unsafe {
|
||||
syscall!(
|
||||
SETSOCKOPT,
|
||||
socket,
|
||||
level,
|
||||
option_name,
|
||||
option_value,
|
||||
option_len
|
||||
)
|
||||
}) as c_int
|
||||
}
|
||||
|
||||
fn shutdown(socket: c_int, how: c_int) -> c_int {
|
||||
e(unsafe { syscall!(SHUTDOWN, socket, how) }) as c_int
|
||||
}
|
||||
|
||||
fn socketpair(domain: c_int, kind: c_int, protocol: c_int, socket_vector: *mut c_int) -> c_int {
|
||||
e(unsafe { syscall!(SOCKETPAIR, domain, kind, protocol, socket_vector) }) as c_int
|
||||
}
|
||||
}
|
||||
|
||||
impl PalSocket for Sys {
|
||||
unsafe fn accept(socket: c_int, address: *mut sockaddr, address_len: *mut socklen_t) -> c_int {
|
||||
e(syscall!(ACCEPT, socket, address, address_len)) as c_int
|
||||
@@ -32,29 +84,6 @@ impl PalSocket for Sys {
|
||||
e(syscall!(GETSOCKNAME, socket, address, address_len)) as c_int
|
||||
}
|
||||
|
||||
fn getsockopt(
|
||||
socket: c_int,
|
||||
level: c_int,
|
||||
option_name: c_int,
|
||||
option_value: *mut c_void,
|
||||
option_len: *mut socklen_t,
|
||||
) -> c_int {
|
||||
e(unsafe {
|
||||
syscall!(
|
||||
GETSOCKOPT,
|
||||
socket,
|
||||
level,
|
||||
option_name,
|
||||
option_value,
|
||||
option_len
|
||||
)
|
||||
}) as c_int
|
||||
}
|
||||
|
||||
fn listen(socket: c_int, backlog: c_int) -> c_int {
|
||||
e(unsafe { syscall!(LISTEN, socket, backlog) }) as c_int
|
||||
}
|
||||
|
||||
unsafe fn recvfrom(
|
||||
socket: c_int,
|
||||
buf: *mut c_void,
|
||||
@@ -87,34 +116,7 @@ impl PalSocket for Sys {
|
||||
)) as ssize_t
|
||||
}
|
||||
|
||||
fn setsockopt(
|
||||
socket: c_int,
|
||||
level: c_int,
|
||||
option_name: c_int,
|
||||
option_value: *const c_void,
|
||||
option_len: socklen_t,
|
||||
) -> c_int {
|
||||
e(unsafe {
|
||||
syscall!(
|
||||
SETSOCKOPT,
|
||||
socket,
|
||||
level,
|
||||
option_name,
|
||||
option_value,
|
||||
option_len
|
||||
)
|
||||
}) as c_int
|
||||
}
|
||||
|
||||
fn shutdown(socket: c_int, how: c_int) -> c_int {
|
||||
e(unsafe { syscall!(SHUTDOWN, socket, how) }) as c_int
|
||||
}
|
||||
|
||||
unsafe fn socket(domain: c_int, kind: c_int, protocol: c_int) -> c_int {
|
||||
e(syscall!(SOCKET, domain, kind, protocol)) as c_int
|
||||
}
|
||||
|
||||
fn socketpair(domain: c_int, kind: c_int, protocol: c_int, socket_vector: *mut c_int) -> c_int {
|
||||
e(unsafe { syscall!(SOCKETPAIR, domain, kind, protocol, socket_vector) }) as c_int
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user