@@ -22,15 +22,20 @@ use libc;
22
22
#[ cfg( target_os = "macos" ) ]
23
23
#[ cfg( target_os = "freebsd" ) ]
24
24
pub static FIONBIO : libc:: c_ulong = 0x8004667e ;
25
- #[ cfg( target_os = "linux" ) ]
25
+ #[ cfg( target_os = "linux" , not ( target_arch = "mips" ) ) ]
26
26
#[ cfg( target_os = "android" ) ]
27
27
pub static FIONBIO : libc:: c_ulong = 0x5421 ;
28
+ #[ cfg( target_os = "linux" , target_arch = "mips" ) ]
29
+ pub static FIONBIO : libc:: c_ulong = 0x667e ;
30
+
28
31
#[ cfg( target_os = "macos" ) ]
29
32
#[ cfg( target_os = "freebsd" ) ]
30
33
pub static FIOCLEX : libc:: c_ulong = 0x20006601 ;
31
- #[ cfg( target_os = "linux" ) ]
34
+ #[ cfg( target_os = "linux" , not ( target_arch = "mips" ) ) ]
32
35
#[ cfg( target_os = "android" ) ]
33
36
pub static FIOCLEX : libc:: c_ulong = 0x5451 ;
37
+ #[ cfg( target_os = "linux" , target_arch = "mips" ) ]
38
+ pub static FIOCLEX : libc:: c_ulong = 0x6601 ;
34
39
35
40
#[ cfg( target_os = "macos" ) ]
36
41
#[ cfg( target_os = "freebsd" ) ]
@@ -100,7 +105,7 @@ mod select {
100
105
}
101
106
}
102
107
103
- #[ cfg( target_os = "linux" ) ]
108
+ #[ cfg( target_os = "linux" , not ( target_arch = "mips" ) ) ]
104
109
#[ cfg( target_os = "android" ) ]
105
110
mod signal {
106
111
use libc;
@@ -143,6 +148,44 @@ mod signal {
143
148
}
144
149
}
145
150
151
+ #[ cfg( target_os = "linux" , target_arch = "mips" ) ]
152
+ mod signal {
153
+ use libc;
154
+
155
+ pub static SA_NOCLDSTOP : libc:: c_ulong = 0x00000001 ;
156
+ pub static SA_NOCLDWAIT : libc:: c_ulong = 0x00010000 ;
157
+ pub static SA_NODEFER : libc:: c_ulong = 0x40000000 ;
158
+ pub static SA_ONSTACK : libc:: c_ulong = 0x08000000 ;
159
+ pub static SA_RESETHAND : libc:: c_ulong = 0x80000000 ;
160
+ pub static SA_RESTART : libc:: c_ulong = 0x10000000 ;
161
+ pub static SA_SIGINFO : libc:: c_ulong = 0x00000008 ;
162
+ pub static SIGCHLD : libc:: c_int = 18 ;
163
+
164
+ // This definition is not as accurate as it could be, {pid, uid, status} is
165
+ // actually a giant union. Currently we're only interested in these fields,
166
+ // however.
167
+ pub struct siginfo {
168
+ si_signo : libc:: c_int ,
169
+ si_code : libc:: c_int ,
170
+ si_errno : libc:: c_int ,
171
+ pub pid : libc:: pid_t ,
172
+ pub uid : libc:: uid_t ,
173
+ pub status : libc:: c_int ,
174
+ }
175
+
176
+ pub struct sigaction {
177
+ pub sa_flags : libc:: c_uint ,
178
+ pub sa_handler : extern fn ( libc:: c_int ) ,
179
+ pub sa_mask : sigset_t ,
180
+ sa_restorer : * mut libc:: c_void ,
181
+ sa_resv : [ libc:: c_int , ..1 ] ,
182
+ }
183
+
184
+ pub struct sigset_t {
185
+ __val : [ libc:: c_ulong , ..32 ] ,
186
+ }
187
+ }
188
+
146
189
#[ cfg( target_os = "macos" ) ]
147
190
#[ cfg( target_os = "freebsd" ) ]
148
191
mod signal {
0 commit comments