@@ -22,15 +22,20 @@ use libc;
2222#[ cfg( target_os = "macos" ) ]
2323#[ cfg( target_os = "freebsd" ) ]
2424pub static FIONBIO : libc:: c_ulong = 0x8004667e ;
25- #[ cfg( target_os = "linux" ) ]
25+ #[ cfg( target_os = "linux" , not ( target_arch = "mips" ) ) ]
2626#[ cfg( target_os = "android" ) ]
2727pub static FIONBIO : libc:: c_ulong = 0x5421 ;
28+ #[ cfg( target_os = "linux" , target_arch = "mips" ) ]
29+ pub static FIONBIO : libc:: c_ulong = 0x667e ;
30+
2831#[ cfg( target_os = "macos" ) ]
2932#[ cfg( target_os = "freebsd" ) ]
3033pub static FIOCLEX : libc:: c_ulong = 0x20006601 ;
31- #[ cfg( target_os = "linux" ) ]
34+ #[ cfg( target_os = "linux" , not ( target_arch = "mips" ) ) ]
3235#[ cfg( target_os = "android" ) ]
3336pub static FIOCLEX : libc:: c_ulong = 0x5451 ;
37+ #[ cfg( target_os = "linux" , target_arch = "mips" ) ]
38+ pub static FIOCLEX : libc:: c_ulong = 0x6601 ;
3439
3540#[ cfg( target_os = "macos" ) ]
3641#[ cfg( target_os = "freebsd" ) ]
@@ -100,7 +105,7 @@ mod select {
100105 }
101106}
102107
103- #[ cfg( target_os = "linux" ) ]
108+ #[ cfg( target_os = "linux" , not ( target_arch = "mips" ) ) ]
104109#[ cfg( target_os = "android" ) ]
105110mod signal {
106111 use libc;
@@ -143,6 +148,44 @@ mod signal {
143148 }
144149}
145150
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+
146189#[ cfg( target_os = "macos" ) ]
147190#[ cfg( target_os = "freebsd" ) ]
148191mod signal {
0 commit comments