@@ -792,6 +792,23 @@ s_no_extra_traits! {
792
792
pub ifr_ifru: :: sockaddr,
793
793
}
794
794
795
+ #[ cfg( libc_union) ]
796
+ pub union __c_anonymous_ifc_ifcu {
797
+ pub ifcu_buf: * mut :: c_char,
798
+ pub ifcu_req: * mut :: ifreq,
799
+ }
800
+
801
+ /* Structure used in SIOCGIFCONF request. Used to retrieve interface
802
+ configuration for machine (useful for programs which must know all
803
+ networks accessible). */
804
+ pub struct ifconf {
805
+ pub ifc_len: :: c_int, /* Size of buffer. */
806
+ #[ cfg( libc_union) ]
807
+ pub ifc_ifcu: __c_anonymous_ifc_ifcu,
808
+ #[ cfg( not( libc_union) ) ]
809
+ pub ifc_ifcu: * mut :: ifreq,
810
+ }
811
+
795
812
pub struct hwtstamp_config {
796
813
pub flags: :: c_int,
797
814
pub tx_type: :: c_int,
@@ -1228,7 +1245,23 @@ cfg_if! {
1228
1245
. finish( )
1229
1246
}
1230
1247
}
1231
-
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
+ }
1232
1265
impl :: fmt:: Debug for hwtstamp_config {
1233
1266
fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
1234
1267
f. debug_struct( "hwtstamp_config" )
0 commit comments