@@ -6,68 +6,96 @@ pub type wchar_t = u32;
6
6
pub type c_long = i32 ;
7
7
pub type c_ulong = u32 ;
8
8
9
+ pub type sigset_t = :: c_ulong ;
10
+
9
11
s ! {
10
12
pub struct sockaddr {
13
+ pub sa_len: u8 ,
11
14
pub sa_family: :: sa_family_t,
12
15
pub sa_data: [ :: c_char; 14 ] ,
13
16
}
14
17
15
18
pub struct sockaddr_in6 {
19
+ pub sin6_len: u8 ,
16
20
pub sin6_family: :: sa_family_t,
17
21
pub sin6_port: :: in_port_t,
18
22
pub sin6_flowinfo: u32 ,
19
23
pub sin6_addr: :: in6_addr,
24
+ pub sin6_vport: :: in_port_t,
20
25
pub sin6_scope_id: u32 ,
21
26
}
22
27
23
28
pub struct sockaddr_in {
29
+ pub sin_len: u8 ,
24
30
pub sin_family: :: sa_family_t,
25
31
pub sin_port: :: in_port_t,
26
32
pub sin_addr: :: in_addr,
27
- pub sin_zero: [ u8 ; 8 ] ,
33
+ pub sin_vport: :: in_port_t,
34
+ pub sin_zero: [ u8 ; 6 ] ,
28
35
}
29
36
30
37
pub struct sockaddr_un {
31
- pub sun_len: :: c_uchar,
32
38
pub sun_family: :: sa_family_t,
33
- pub sun_path: [ :: c_char; 104usize ] ,
39
+ pub sun_path: [ :: c_char; 108usize ] ,
34
40
}
35
41
36
42
pub struct sockaddr_storage {
43
+ pub ss_len: u8 ,
37
44
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 ] ,
39
48
}
40
49
41
-
42
50
pub struct sched_param {
43
51
pub sched_priority: :: c_int,
44
52
}
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
+ }
45
70
}
46
71
47
72
pub const AF_UNIX : :: c_int = 1 ;
48
- pub const AF_INET6 : :: c_int = 23 ;
73
+ pub const AF_INET6 : :: c_int = 24 ;
49
74
50
- pub const FIONBIO : :: c_ulong = 0x8004667e ;
75
+ pub const FIONBIO : :: c_ulong = 1 ;
51
76
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 ;
58
83
59
84
pub const RTLD_DEFAULT : * mut :: c_void = 0 as * mut :: c_void ;
60
85
61
86
pub const SOL_SOCKET : :: c_int = 0xffff ;
87
+ pub const SO_NONBLOCK : :: c_int = 0x1100 ;
62
88
63
89
pub const MSG_OOB : :: c_int = 0x1 ;
64
90
pub const MSG_PEEK : :: c_int = 0x2 ;
65
91
pub 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 ;
71
99
72
100
pub const UTIME_OMIT : c_long = -1 ;
73
101
pub const AT_FDCWD : :: c_int = -2 ;
@@ -111,7 +139,7 @@ pub const EAI_OVERFLOW: ::c_int = -12;
111
139
112
140
pub const _SC_PAGESIZE: :: c_int = 8 ;
113
141
pub 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 ;
115
143
116
144
extern "C" {
117
145
pub fn futimens ( fd : :: c_int , times : * const :: timespec ) -> :: c_int ;
@@ -171,5 +199,3 @@ extern "C" {
171
199
172
200
pub fn getentropy ( buf : * mut :: c_void , buflen : :: size_t ) -> :: c_int ;
173
201
}
174
-
175
- pub use crate :: unix:: newlib:: generic:: { sigset_t, stat} ;
0 commit comments