Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions libc-test/semver/wasi-p2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ SHUT_RD
SHUT_RDWR
SHUT_WR
SOCK_DGRAM
SOCK_NONBLOCK
SOCK_STREAM
SOL_SOCKET
SO_ACCEPTCONN
SO_BROADCAST
SO_DOMAIN
Expand All @@ -39,7 +37,6 @@ SO_RCVTIMEO
SO_REUSEADDR
SO_SNDBUF
SO_SNDTIMEO
SO_TYPE
TCP_KEEPCNT
TCP_KEEPIDLE
TCP_KEEPINTVL
Expand Down
4 changes: 4 additions & 0 deletions libc-test/semver/wasi.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
FD_ISSET
FD_SET
FD_ZERO
SOCK_CLOEXEC
SOCK_NONBLOCK
SOL_SOCKET
SO_TYPE
_SC_2_CHAR_TERM
_SC_2_C_BIND
_SC_2_C_DEV
Expand Down
7 changes: 7 additions & 0 deletions src/wasi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,13 @@ pub const PTHREAD_BARRIER_SERIAL_THREAD: c_int = -1;
pub const PTHREAD_STACK_MIN: usize = 2048;
pub const TIMER_ABSTIME: c_int = 1;

pub const SOCK_CLOEXEC: c_int = 0x00002000;
pub const SOCK_NONBLOCK: c_int = 0x00004000;

pub const SOL_SOCKET: c_int = 0x7fffffff;

pub const SO_TYPE: c_int = 3;

f! {
pub unsafe fn FD_ISSET(fd: c_int, set: *const fd_set) -> bool {
let set = &*set;
Expand Down
4 changes: 0 additions & 4 deletions src/wasi/p2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ pub const MSG_NOSIGNAL: c_int = 0x4000;
pub const MSG_PEEK: c_int = 0x0002;

pub const SO_REUSEADDR: c_int = 2;
pub const SO_TYPE: c_int = 3;
pub const SO_ERROR: c_int = 4;
pub const SO_BROADCAST: c_int = 6;
pub const SO_SNDBUF: c_int = 7;
Expand All @@ -94,9 +93,6 @@ pub const SO_SNDTIMEO: c_int = 67;

pub const SOCK_DGRAM: c_int = 5;
pub const SOCK_STREAM: c_int = 6;
pub const SOCK_NONBLOCK: c_int = 0x00004000;

pub const SOL_SOCKET: c_int = 0x7fffffff;

pub const AF_UNSPEC: c_int = 0;
pub const AF_INET: c_int = 1;
Expand Down