@@ -960,6 +960,13 @@ s! {
960960 pub sc_ngroups: :: c_int,
961961 pub sc_groups: [ :: gid_t; 1 ] ,
962962 }
963+
964+ pub struct ifconf {
965+ pub ifc_len: :: c_int,
966+ #[ cfg( libc_union) ]
967+ pub ifc_ifcu: __c_anonymous_ifc_ifcu,
968+ }
969+
963970}
964971
965972s_no_extra_traits ! {
@@ -1142,6 +1149,12 @@ s_no_extra_traits! {
11421149 pub ifr_ifru: :: sockaddr,
11431150 }
11441151
1152+ #[ cfg( libc_union) ]
1153+ pub union __c_anonymous_ifc_ifcu {
1154+ pub ifcu_buf: :: caddr_t,
1155+ pub ifcu_req: * mut ifreq,
1156+ }
1157+
11451158 pub struct ifstat {
11461159 /// if name, e.g. "en0"
11471160 pub ifs_name: [ :: c_char; :: IFNAMSIZ as usize ] ,
@@ -1549,6 +1562,37 @@ cfg_if! {
15491562 }
15501563 }
15511564
1565+ #[ cfg( libc_union) ]
1566+ impl Eq for __c_anonymous_ifc_ifcu { }
1567+
1568+ #[ cfg( libc_union) ]
1569+ impl PartialEq for __c_anonymous_ifc_ifcu {
1570+ fn eq( & self , other: & __c_anonymous_ifc_ifcu) -> bool {
1571+ unsafe {
1572+ self . ifcu_buf == other. ifcu_buf &&
1573+ self . ifcu_req == other. ifcu_req
1574+ }
1575+ }
1576+ }
1577+
1578+ #[ cfg( libc_union) ]
1579+ impl :: fmt:: Debug for __c_anonymous_ifc_ifcu {
1580+ fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
1581+ f. debug_struct( "ifc_ifcu" )
1582+ . field( "ifcu_buf" , unsafe { & self . ifcu_buf } )
1583+ . field( "ifcu_req" , unsafe { & self . ifcu_req } )
1584+ . finish( )
1585+ }
1586+ }
1587+
1588+ #[ cfg( libc_union) ]
1589+ impl :: hash:: Hash for __c_anonymous_ifc_ifcu {
1590+ fn hash<H : :: hash:: Hasher >( & self , state: & mut H ) {
1591+ unsafe { self . ifcu_buf. hash( state) } ;
1592+ unsafe { self . ifcu_req. hash( state) } ;
1593+ }
1594+ }
1595+
15521596 impl PartialEq for ifstat {
15531597 fn eq( & self , other: & ifstat) -> bool {
15541598 let self_ascii: & [ :: c_char] = & self . ascii;
0 commit comments