File tree 2 files changed +25
-10
lines changed
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;
21
21
pub type sigset_t = :: c_ulong ;
22
22
23
23
s ! {
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
+
24
32
pub struct sockaddr {
25
33
pub sa_family: :: sa_family_t,
26
34
pub sa_data: [ :: c_char; 26usize ] ,
35
43
pub sin_family: :: sa_family_t,
36
44
pub sin_port: :: in_port_t,
37
45
pub sin_addr: :: in_addr,
46
+ pub sin_zero: [ :: c_char; 8 ] ,
38
47
}
39
48
40
49
pub struct sockaddr_in6 {
Original file line number Diff line number Diff line change @@ -53,6 +53,21 @@ cfg_if! {
53
53
}
54
54
}
55
55
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
+
56
71
s ! {
57
72
// The order of the `ai_addr` field in this struct is crucial
58
73
// for converting between the Rust and C types.
87
102
}
88
103
89
104
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,
100
106
}
101
107
102
108
pub struct pollfd {
You can’t perform that action at this time.
0 commit comments