@@ -792,6 +792,23 @@ s_no_extra_traits! {
792792 pub ifr_ifru: :: sockaddr,
793793 }
794794
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+
795812 pub struct hwtstamp_config {
796813 pub flags: :: c_int,
797814 pub tx_type: :: c_int,
@@ -1229,6 +1246,23 @@ cfg_if! {
12291246 }
12301247 }
12311248
1249+ #[ cfg( libc_union) ]
1250+ impl :: fmt:: Debug for __c_anonymous_ifc_ifcu {
1251+ fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
1252+ f. debug_struct( "ifr_ifru" )
1253+ . field( "ifcu_buf" , unsafe { & self . ifcu_buf } )
1254+ . field( "ifcu_req" , unsafe { & self . ifcu_req } )
1255+ . finish( )
1256+ }
1257+ }
1258+ impl :: fmt:: Debug for ifconf {
1259+ fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
1260+ f. debug_struct( "ifconf" )
1261+ . field( "ifc_len" , & self . ifc_len)
1262+ . field( "ifc_ifcu" , & self . ifc_ifcu)
1263+ . finish( )
1264+ }
1265+ }
12321266 impl :: fmt:: Debug for hwtstamp_config {
12331267 fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
12341268 f. debug_struct( "hwtstamp_config" )
0 commit comments