Add shutdown, listen, and getpagesize

This commit is contained in:
Jeremy Soller
2018-12-26 19:26:38 -07:00
parent a321545fd0
commit 7aa789575a
8 changed files with 41 additions and 18 deletions
+2
View File
@@ -75,6 +75,8 @@ pub trait Pal {
fn getgid() -> gid_t;
fn getpagesize() -> c_int;
fn getpgid(pid: pid_t) -> pid_t;
fn getpid() -> pid_t;
+4
View File
@@ -29,6 +29,8 @@ pub trait PalSocket: Pal {
option_len: *mut socklen_t,
) -> c_int;
fn listen(socket: c_int, backlog: c_int) -> c_int;
unsafe fn recvfrom(
socket: c_int,
buf: *mut c_void,
@@ -55,5 +57,7 @@ pub trait PalSocket: Pal {
option_len: socklen_t,
) -> c_int;
fn shutdown(socket: c_int, how: c_int) -> c_int;
unsafe fn socket(domain: c_int, kind: c_int, protocol: c_int) -> c_int;
}