File tree Expand file tree Collapse file tree 9 files changed +20
-78
lines changed
src/unix/linux_like/linux/musl Expand file tree Collapse file tree 9 files changed +20
-78
lines changed Original file line number Diff line number Diff line change @@ -112,14 +112,6 @@ s! {
112112 pub f_spare: [ :: c_ulong; 4 ] ,
113113 }
114114
115- pub struct siginfo_t {
116- pub si_signo: :: c_int,
117- pub si_errno: :: c_int,
118- pub si_code: :: c_int,
119- pub _pad: [ :: c_int; 29 ] ,
120- _align: [ usize ; 0 ] ,
121- }
122-
123115 pub struct statfs64 {
124116 pub f_type: :: c_ulong,
125117 pub f_bsize: :: c_ulong,
Original file line number Diff line number Diff line change 9090 pub f_spare: [ :: c_ulong; 4 ] ,
9191 }
9292
93- pub struct siginfo_t {
94- pub si_signo: :: c_int,
95- pub si_errno: :: c_int,
96- pub si_code: :: c_int,
97- pub _pad: [ :: c_int; 29 ] ,
98- _align: [ usize ; 0 ] ,
99- }
100-
10193 pub struct statfs64 {
10294 pub f_type: :: c_ulong,
10395 pub f_bsize: :: c_ulong,
Original file line number Diff line number Diff line change @@ -120,14 +120,6 @@ s! {
120120 pub f_spare: [ :: c_ulong; 5 ] ,
121121 }
122122
123- pub struct siginfo_t {
124- pub si_signo: :: c_int,
125- pub si_code: :: c_int,
126- pub si_errno: :: c_int,
127- pub _pad: [ :: c_int; 29 ] ,
128- _align: [ usize ; 0 ] ,
129- }
130-
131123 pub struct statfs64 {
132124 pub f_type: :: c_ulong,
133125 pub f_bsize: :: c_ulong,
Original file line number Diff line number Diff line change @@ -112,14 +112,6 @@ s! {
112112 pub f_spare: [ :: c_ulong; 4 ] ,
113113 }
114114
115- pub struct siginfo_t {
116- pub si_signo: :: c_int,
117- pub si_errno: :: c_int,
118- pub si_code: :: c_int,
119- pub _pad: [ :: c_int; 29 ] ,
120- _align: [ usize ; 0 ] ,
121- }
122-
123115 pub struct statfs64 {
124116 pub f_type: :: c_ulong,
125117 pub f_bsize: :: c_ulong,
Original file line number Diff line number Diff line change @@ -113,21 +113,6 @@ s! {
113113 __f_spare: [ :: c_int; 6 ] ,
114114 }
115115
116- pub struct siginfo_t {
117- pub si_signo: :: c_int,
118- pub si_errno: :: c_int,
119- pub si_code: :: c_int,
120- #[ doc( hidden) ]
121- #[ deprecated(
122- since = "0.2.54" ,
123- note = "Please leave a comment on \
124- https://github.com/rust-lang/libc/pull/1316 if you're using \
125- this field"
126- ) ]
127- pub _pad: [ :: c_int; 29 ] ,
128- _align: [ u64 ; 0 ] ,
129- }
130-
131116 pub struct stack_t {
132117 pub ss_sp: * mut :: c_void,
133118 pub ss_flags: :: c_int,
Original file line number Diff line number Diff line change @@ -116,14 +116,6 @@ s! {
116116 pub f_spare: [ :: c_ulong; 4 ] ,
117117 }
118118
119- pub struct siginfo_t {
120- pub si_signo: :: c_int,
121- pub si_errno: :: c_int,
122- pub si_code: :: c_int,
123- pub _pad: [ :: c_int; 29 ] ,
124- _align: [ usize ; 0 ] ,
125- }
126-
127119 pub struct statfs64 {
128120 pub f_type: :: c_ulong,
129121 pub f_bsize: :: c_ulong,
Original file line number Diff line number Diff line change @@ -120,14 +120,6 @@ s! {
120120 pub struct sem_t {
121121 __val: [ :: c_int; 8 ] ,
122122 }
123-
124- pub struct siginfo_t {
125- pub si_signo: :: c_int,
126- pub si_errno: :: c_int,
127- pub si_code: :: c_int,
128- pub _pad: [ :: c_int; 29 ] ,
129- _align: [ usize ; 0 ] ,
130- }
131123}
132124
133125pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56 ;
Original file line number Diff line number Diff line change @@ -119,21 +119,6 @@ s! {
119119 pub __f_spare: [ :: c_int; 6 ] ,
120120 }
121121
122- pub struct siginfo_t {
123- pub si_signo: :: c_int,
124- pub si_errno: :: c_int,
125- pub si_code: :: c_int,
126- #[ doc( hidden) ]
127- #[ deprecated(
128- since = "0.2.54" ,
129- note = "Please leave a comment on \
130- https://github.com/rust-lang/libc/pull/1316 if you're using \
131- this field"
132- ) ]
133- pub _pad: [ :: c_int; 29 ] ,
134- _align: [ u64 ; 0 ] ,
135- }
136-
137122 pub struct stack_t {
138123 pub ss_sp: * mut :: c_void,
139124 pub ss_flags: :: c_int,
Original file line number Diff line number Diff line change @@ -144,6 +144,26 @@ s! {
144144 pub sa_restorer: :: Option <extern "C" fn ( ) >,
145145 }
146146
147+ // `mips*` targets swap the `s_errno` and `s_code` fields otherwise this struct is
148+ // target-agnostic (see https://www.openwall.com/lists/musl/2016/01/27/1/2)
149+ pub struct siginfo_t {
150+ pub si_signo: :: c_int,
151+ #[ cfg( not( target_arch = "mips" ) ) ]
152+ pub si_errno: :: c_int,
153+ pub si_code: :: c_int,
154+ #[ cfg( target_arch = "mips" ) ]
155+ pub si_errno: :: c_int,
156+ #[ doc( hidden) ]
157+ #[ deprecated(
158+ since = "0.2.54" ,
159+ note = "Please leave a comment on \
160+ https://github.com/rust-lang/libc/pull/1316 if you're using \
161+ this field"
162+ ) ]
163+ pub _pad: [ :: c_int; 29 ] ,
164+ _align: [ usize ; 0 ] ,
165+ }
166+
147167 pub struct statvfs {
148168 pub f_bsize: :: c_ulong,
149169 pub f_frsize: :: c_ulong,
You can’t perform that action at this time.
0 commit comments