@@ -6,68 +6,96 @@ pub type wchar_t = u32;
66pub type c_long = i32 ;
77pub type c_ulong = u32 ;
88
9+ pub type sigset_t = :: c_ulong ;
10+
911s ! {
1012 pub struct sockaddr {
13+ pub sa_len: u8 ,
1114 pub sa_family: :: sa_family_t,
1215 pub sa_data: [ :: c_char; 14 ] ,
1316 }
1417
1518 pub struct sockaddr_in6 {
19+ pub sin6_len: u8 ,
1620 pub sin6_family: :: sa_family_t,
1721 pub sin6_port: :: in_port_t,
1822 pub sin6_flowinfo: u32 ,
1923 pub sin6_addr: :: in6_addr,
24+ pub sin6_vport: :: in_port_t,
2025 pub sin6_scope_id: u32 ,
2126 }
2227
2328 pub struct sockaddr_in {
29+ pub sin_len: u8 ,
2430 pub sin_family: :: sa_family_t,
2531 pub sin_port: :: in_port_t,
2632 pub sin_addr: :: in_addr,
27- pub sin_zero: [ u8 ; 8 ] ,
33+ pub sin_vport: :: in_port_t,
34+ pub sin_zero: [ u8 ; 6 ] ,
2835 }
2936
3037 pub struct sockaddr_un {
31- pub sun_len: :: c_uchar,
3238 pub sun_family: :: sa_family_t,
33- pub sun_path: [ :: c_char; 104usize ] ,
39+ pub sun_path: [ :: c_char; 108usize ] ,
3440 }
3541
3642 pub struct sockaddr_storage {
43+ pub ss_len: u8 ,
3744 pub ss_family: :: sa_family_t,
38- pub __ss_padding: [ u8 ; 26 ] ,
45+ pub __ss_pad1: [ u8 ; 4 ] ,
46+ pub __ss_align: i64 ,
47+ pub __ss_pad2: [ u8 ; 4 ] ,
3948 }
4049
41-
4250 pub struct sched_param {
4351 pub sched_priority: :: c_int,
4452 }
53+
54+ pub struct stat {
55+ pub st_dev: :: dev_t,
56+ pub st_ino: :: ino_t,
57+ pub st_mode: :: mode_t,
58+ pub st_nlink: :: nlink_t,
59+ pub st_uid: :: uid_t,
60+ pub st_gid: :: gid_t,
61+ pub st_rdev: :: dev_t,
62+ pub st_size: :: off_t,
63+ pub st_atime: :: time_t,
64+ pub st_mtime: :: time_t,
65+ pub st_ctime: :: time_t,
66+ pub st_blksize: :: blksize_t,
67+ pub st_blocks: :: blkcnt_t,
68+ pub st_spare4: [ :: c_long; 2usize ] ,
69+ }
4570}
4671
4772pub const AF_UNIX : :: c_int = 1 ;
48- pub const AF_INET6 : :: c_int = 23 ;
73+ pub const AF_INET6 : :: c_int = 24 ;
4974
50- pub const FIONBIO : :: c_ulong = 0x8004667e ;
75+ pub const FIONBIO : :: c_ulong = 1 ;
5176
52- pub const POLLIN : :: c_short = 1 ;
53- pub const POLLPRI : :: c_short = 2 ;
54- pub const POLLOUT : :: c_short = 4 ;
55- pub const POLLERR : :: c_short = 8 ;
56- pub const POLLHUP : :: c_short = 16 ;
57- pub const POLLNVAL : :: c_short = 32 ;
77+ pub const POLLIN : :: c_short = 0x0001 ;
78+ pub const POLLPRI : :: c_short = POLLIN ;
79+ pub const POLLOUT : :: c_short = 0x0004 ;
80+ pub const POLLERR : :: c_short = 0x0008 ;
81+ pub const POLLHUP : :: c_short = 0x0010 ;
82+ pub const POLLNVAL : :: c_short = 0x0020 ;
5883
5984pub const RTLD_DEFAULT : * mut :: c_void = 0 as * mut :: c_void ;
6085
6186pub const SOL_SOCKET : :: c_int = 0xffff ;
87+ pub const SO_NONBLOCK : :: c_int = 0x1100 ;
6288
6389pub const MSG_OOB : :: c_int = 0x1 ;
6490pub const MSG_PEEK : :: c_int = 0x2 ;
6591pub const MSG_DONTROUTE : :: c_int = 0x4 ;
66- pub const MSG_WAITALL : :: c_int = 0x8 ;
67- pub const MSG_DONTWAIT : :: c_int = 0x10 ;
68- pub const MSG_NOSIGNAL : :: c_int = 0x20 ;
69- pub const MSG_TRUNC : :: c_int = 0x0100 ;
70- pub const MSG_CTRUNC : :: c_int = 0x0200 ;
92+ pub const MSG_EOR : :: c_int = 0x8 ;
93+ pub const MSG_TRUNC : :: c_int = 0x10 ;
94+ pub const MSG_CTRUNC : :: c_int = 0x20 ;
95+ pub const MSG_WAITALL : :: c_int = 0x40 ;
96+ pub const MSG_DONTWAIT : :: c_int = 0x80 ;
97+ pub const MSG_BCAST : :: c_int = 0x100 ;
98+ pub const MSG_MCAST : :: c_int = 0x200 ;
7199
72100pub const UTIME_OMIT : c_long = -1 ;
73101pub const AT_FDCWD : :: c_int = -2 ;
@@ -111,7 +139,7 @@ pub const EAI_OVERFLOW: ::c_int = -12;
111139
112140pub const _SC_PAGESIZE: :: c_int = 8 ;
113141pub const _SC_GETPW_R_SIZE_MAX: :: c_int = 51 ;
114- pub const PTHREAD_STACK_MIN : :: size_t = 200 ;
142+ pub const PTHREAD_STACK_MIN : :: size_t = 32 * 1024 ;
115143
116144extern "C" {
117145 pub fn futimens ( fd : :: c_int , times : * const :: timespec ) -> :: c_int ;
@@ -171,5 +199,3 @@ extern "C" {
171199
172200 pub fn getentropy ( buf : * mut :: c_void , buflen : :: size_t ) -> :: c_int ;
173201}
174-
175- pub use crate :: unix:: newlib:: generic:: { sigset_t, stat} ;
0 commit comments