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