@@ -1129,6 +1129,15 @@ s! {
1129
1129
pub validattr: attribute_set_t,
1130
1130
pub nativeattr: attribute_set_t,
1131
1131
}
1132
+
1133
+ #[ cfg_attr( libc_packedN, repr( packed( 4 ) ) ) ]
1134
+ pub struct ifconf {
1135
+ pub ifc_len: :: c_int,
1136
+ #[ cfg( libc_union) ]
1137
+ pub ifc_ifcu: __c_anonymous_ifc_ifcu,
1138
+ #[ cfg( not( libc_union) ) ]
1139
+ pub ifc_ifcu: * mut ifreq,
1140
+ }
1132
1141
}
1133
1142
1134
1143
s_no_extra_traits ! {
@@ -1467,6 +1476,12 @@ s_no_extra_traits! {
1467
1476
#[ cfg( not( libc_union) ) ]
1468
1477
pub ifr_ifru: :: sockaddr,
1469
1478
}
1479
+
1480
+ #[ cfg( libc_union) ]
1481
+ pub union __c_anonymous_ifc_ifcu {
1482
+ pub ifcu_buf: * mut :: c_char,
1483
+ pub ifcu_req: * mut ifreq,
1484
+ }
1470
1485
}
1471
1486
1472
1487
impl siginfo_t {
@@ -3000,6 +3015,37 @@ cfg_if! {
3000
3015
self . ifr_ifru. hash( state) ;
3001
3016
}
3002
3017
}
3018
+
3019
+ #[ cfg( libc_union) ]
3020
+ impl Eq for __c_anonymous_ifc_ifcu { }
3021
+
3022
+ #[ cfg( libc_union) ]
3023
+ impl PartialEq for __c_anonymous_ifc_ifcu {
3024
+ fn eq( & self , other: & __c_anonymous_ifc_ifcu) -> bool {
3025
+ unsafe {
3026
+ self . ifcu_buf == other. ifcu_buf &&
3027
+ self . ifcu_req == other. ifcu_req
3028
+ }
3029
+ }
3030
+ }
3031
+
3032
+ #[ cfg( libc_union) ]
3033
+ impl :: fmt:: Debug for __c_anonymous_ifc_ifcu {
3034
+ fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
3035
+ f. debug_struct( "ifc_ifcu" )
3036
+ . field( "ifcu_buf" , unsafe { & self . ifcu_buf } )
3037
+ . field( "ifcu_req" , unsafe { & self . ifcu_req } )
3038
+ . finish( )
3039
+ }
3040
+ }
3041
+
3042
+ #[ cfg( libc_union) ]
3043
+ impl :: hash:: Hash for __c_anonymous_ifc_ifcu {
3044
+ fn hash<H : :: hash:: Hasher >( & self , state: & mut H ) {
3045
+ unsafe { self . ifcu_buf. hash( state) } ;
3046
+ unsafe { self . ifcu_req. hash( state) } ;
3047
+ }
3048
+ }
3003
3049
}
3004
3050
}
3005
3051
0 commit comments