1pub type clock_t = ::c_long; 2pub type c_char = u8; 3pub type wchar_t = u32; 4 5pub type c_long = i64; 6pub type c_ulong = u64; 7 8s! { 9 pub struct sockaddr { 10 pub sa_len: u8, 11 pub sa_family: ::sa_family_t, 12 pub sa_data: [::c_char; 14], 13 } 14 15 pub struct sockaddr_in6 { 16 pub sin6_len: u8, 17 pub sin6_family: ::sa_family_t, 18 pub sin6_port: ::in_port_t, 19 pub sin6_flowinfo: u32, 20 pub sin6_addr: ::in6_addr, 21 pub sin6_scope_id: u32, 22 } 23 24 pub struct sockaddr_in { 25 pub sin_len: u8, 26 pub sin_family: ::sa_family_t, 27 pub sin_port: ::in_port_t, 28 pub sin_addr: ::in_addr, 29 pub sin_zero: [::c_char; 8], 30 } 31} 32 33pub const AF_INET6: ::c_int = 23; 34 35pub const FIONBIO: ::c_ulong = 1; 36 37pub const POLLIN: ::c_short = 0x1; 38pub const POLLPRI: ::c_short = 0x2; 39pub const POLLOUT: ::c_short = 0x4; 40pub const POLLERR: ::c_short = 0x8; 41pub const POLLHUP: ::c_short = 0x10; 42pub const POLLNVAL: ::c_short = 0x20; 43 44pub const SOL_SOCKET: ::c_int = 65535; 45 46pub const MSG_OOB: ::c_int = 1; 47pub const MSG_PEEK: ::c_int = 2; 48pub const MSG_DONTWAIT: ::c_int = 4; 49pub const MSG_DONTROUTE: ::c_int = 0; 50pub const MSG_WAITALL: ::c_int = 0; 51pub const MSG_MORE: ::c_int = 0; 52pub const MSG_NOSIGNAL: ::c_int = 0; 53 54pub use crate::unix::newlib::generic::{sigset_t, stat}; 55