Skip to content

Commit c18f563

Browse files
committed
Auto merge of #1477 - leo60228:newlib-freebsd-sockets, r=gnzlbg
Update newlib socket types to FreeBSD None
2 parents 70d1f16 + eb287a1 commit c18f563

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

src/unix/newlib/mod.rs

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,28 +26,26 @@ pub type useconds_t = u32;
2626

2727
s! {
2828
pub struct sockaddr {
29+
pub sa_len: u8,
2930
pub sa_family: sa_family_t,
3031
pub sa_data: [::c_char; 14],
3132
}
3233

33-
pub struct sockaddr_in {
34-
pub sin_family: sa_family_t,
35-
pub sin_port: ::in_port_t,
36-
pub sin_addr: ::in_addr,
37-
pub sin_zero: [u8; 8],
38-
}
39-
40-
pub struct sockaddr_in6 { // Unverified
34+
pub struct sockaddr_in6 {
35+
pub sin6_len: u8,
4136
pub sin6_family: sa_family_t,
4237
pub sin6_port: ::in_port_t,
4338
pub sin6_flowinfo: u32,
4439
pub sin6_addr: ::in6_addr,
4540
pub sin6_scope_id: u32,
4641
}
4742

48-
pub struct sockaddr_storage {
49-
pub ss_family: sa_family_t,
50-
pub __ss_padding: [u8; 26],
43+
pub struct sockaddr_in {
44+
pub sin_len: u8,
45+
pub sin_family: ::sa_family_t,
46+
pub sin_port: ::in_port_t,
47+
pub sin_addr: ::in_addr,
48+
pub sin_zero: [::c_char; 8],
5149
}
5250

5351
pub struct addrinfo {

0 commit comments

Comments
 (0)