File tree Expand file tree Collapse file tree 2 files changed +25
-10
lines changed Expand file tree Collapse file tree 2 files changed +25
-10
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,14 @@ pub type sbintime_t = ::c_longlong;
2121pub type sigset_t = :: c_ulong ;
2222
2323s ! {
24+ pub struct hostent {
25+ pub h_name: * mut :: c_char,
26+ pub h_aliases: * mut * mut :: c_char,
27+ pub h_addrtype: u16 ,
28+ pub h_length: u16 ,
29+ pub h_addr_list: * mut * mut :: c_char,
30+ }
31+
2432 pub struct sockaddr {
2533 pub sa_family: :: sa_family_t,
2634 pub sa_data: [ :: c_char; 26usize ] ,
3543 pub sin_family: :: sa_family_t,
3644 pub sin_port: :: in_port_t,
3745 pub sin_addr: :: in_addr,
46+ pub sin_zero: [ :: c_char; 8 ] ,
3847 }
3948
4049 pub struct sockaddr_in6 {
Original file line number Diff line number Diff line change @@ -53,6 +53,21 @@ cfg_if! {
5353 }
5454}
5555
56+ cfg_if ! {
57+ if #[ cfg( not( target_os = "horizon" ) ) ] {
58+ s!{
59+ pub struct hostent {
60+ pub h_name: * mut :: c_char,
61+ pub h_aliases: * mut * mut :: c_char,
62+ pub h_addrtype: :: c_int,
63+ pub h_length: :: c_int,
64+ pub h_addr_list: * mut * mut :: c_char,
65+ pub h_addr: * mut :: c_char,
66+ }
67+ }
68+ }
69+ }
70+
5671s ! {
5772 // The order of the `ai_addr` field in this struct is crucial
5873 // for converting between the Rust and C types.
87102 }
88103
89104 pub struct in_addr {
90- pub s_addr: :: in_addr_t,
91- }
92-
93- pub struct hostent {
94- pub h_name: * mut :: c_char,
95- pub h_aliases: * mut * mut :: c_char,
96- pub h_addrtype: :: c_int,
97- pub h_length: :: c_int,
98- pub h_addr_list: * mut * mut :: c_char,
99- pub h_addr: * mut :: c_char,
105+ pub s_addr: :: in_addr_t,
100106 }
101107
102108 pub struct pollfd {
You can’t perform that action at this time.
0 commit comments