@@ -792,17 +792,21 @@ s_no_extra_traits! {
792
792
pub ifr_ifru: :: sockaddr,
793
793
}
794
794
795
+ #[ cfg( libc_union) ]
795
796
pub union __c_anonymous_ifc_ifcu {
796
- ifcu_buf: * mut :: c_char,
797
- ifcu_req: * mut :: ifreq,
797
+ pub ifcu_buf: * mut :: c_char,
798
+ pub ifcu_req: * mut :: ifreq,
798
799
}
799
800
800
801
/* Structure used in SIOCGIFCONF request. Used to retrieve interface
801
- configuration for machine (useful for programs which must know all
802
- networks accessible). */
802
+ configuration for machine (useful for programs which must know all
803
+ networks accessible). */
803
804
pub struct ifconf {
804
805
pub ifc_len: :: c_int, /* Size of buffer. */
806
+ #[ cfg( libc_union) ]
805
807
pub ifc_ifcu: __c_anonymous_ifc_ifcu,
808
+ #[ cfg( not( libc_union) ) ]
809
+ pub ifc_ifcu: * mut :: ifreq,
806
810
}
807
811
808
812
pub struct hwtstamp_config {
@@ -1241,7 +1245,23 @@ cfg_if! {
1241
1245
. finish( )
1242
1246
}
1243
1247
}
1244
-
1248
+ #[ cfg( libc_union) ]
1249
+ impl :: fmt:: Debug for __c_anonymous_ifc_ifcu {
1250
+ fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
1251
+ f. debug_struct( "ifr_ifru" )
1252
+ . field( "ifcu_buf" , unsafe { & self . ifcu_buf } )
1253
+ . field( "ifcu_req" , unsafe { & self . ifcu_req } )
1254
+ . finish( )
1255
+ }
1256
+ }
1257
+ impl :: fmt:: Debug for ifconf {
1258
+ fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
1259
+ f. debug_struct( "ifconf" )
1260
+ . field( "ifc_len" , & self . ifc_len)
1261
+ . field( "ifc_ifcu" , & self . ifc_ifcu)
1262
+ . finish( )
1263
+ }
1264
+ }
1245
1265
impl :: fmt:: Debug for hwtstamp_config {
1246
1266
fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
1247
1267
f. debug_struct( "hwtstamp_config" )
0 commit comments