96
96
}
97
97
98
98
s_no_extra_traits ! {
99
- #[ cfg( libc_union) ]
100
- pub union sigval {
101
- pub sival_ptr: * mut :: c_void,
102
- pub sival_int: :: c_int,
103
- }
104
-
105
99
pub struct siginfo_t {
106
100
pub si_signo: :: c_int,
107
101
pub si_errno: :: c_int,
@@ -111,8 +105,7 @@ s_no_extra_traits! {
111
105
pub si_status: :: c_int,
112
106
pub si_addr: * mut :: c_void,
113
107
pub si_band: :: c_long,
114
- #[ cfg( libc_union) ]
115
- pub si_value: sigval,
108
+ pub si_value: :: sigval,
116
109
pub __si_flags: :: c_int,
117
110
pub __pad: [ :: c_int; 3 ] ,
118
111
}
@@ -197,7 +190,6 @@ impl siginfo_t {
197
190
self . si_addr
198
191
}
199
192
200
- #[ cfg( libc_union) ]
201
193
pub unsafe fn si_value ( & self ) -> :: sigval {
202
194
self . si_value
203
195
}
@@ -217,36 +209,6 @@ impl siginfo_t {
217
209
218
210
cfg_if ! {
219
211
if #[ cfg( feature = "extra_traits" ) ] {
220
- #[ cfg( libc_union) ]
221
- impl PartialEq for sigval {
222
- fn eq( & self , other: & sigval) -> bool {
223
- unsafe {
224
- self . sival_ptr == other. sival_ptr
225
- && self . sival_int == other. sival_int
226
- }
227
- }
228
- }
229
- #[ cfg( libc_union) ]
230
- impl Eq for sigval { }
231
- #[ cfg( libc_union) ]
232
- impl :: fmt:: Debug for sigval {
233
- fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
234
- f. debug_struct( "sigval" )
235
- . field( "sival_ptr" , unsafe { & self . sival_ptr } )
236
- . field( "sival_int" , unsafe { & self . sival_int } )
237
- . finish( )
238
- }
239
- }
240
- #[ cfg( libc_union) ]
241
- impl :: hash:: Hash for sigval {
242
- fn hash<H : :: hash:: Hasher >( & self , state: & mut H ) {
243
- unsafe {
244
- self . sival_ptr. hash( state) ;
245
- self . sival_int. hash( state) ;
246
- }
247
- }
248
- }
249
-
250
212
impl PartialEq for siginfo_t {
251
213
fn eq( & self , other: & siginfo_t) -> bool {
252
214
#[ cfg( libc_union) ]
@@ -313,7 +275,7 @@ cfg_if! {
313
275
#[ cfg( libc_union) ]
314
276
impl :: fmt:: Debug for _kernel_simple_lock {
315
277
fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
316
- f. debug_struct( "sigval " )
278
+ f. debug_struct( "_kernel_simple_lock " )
317
279
. field( "_slock" , unsafe { & self . _slock } )
318
280
. field( "_slockp" , unsafe { & self . _slockp } )
319
281
. finish( )
0 commit comments