diff --git a/src/liblibc/lib.rs b/src/liblibc/lib.rs index 44d689059d1..daaae86f1a6 100644 --- a/src/liblibc/lib.rs +++ b/src/liblibc/lib.rs @@ -863,13 +863,16 @@ pub mod bsd44 { pub sa_data: [u8; 14], } #[repr(C)] - #[derive(Copy, Clone)] pub struct sockaddr_storage { + #[derive(Copy)] pub struct sockaddr_storage { pub ss_len: u8, pub ss_family: sa_family_t, pub __ss_pad1: [u8; 6], pub __ss_align: i64, pub __ss_pad2: [u8; 112], } + impl ::core::clone::Clone for sockaddr_storage { + fn clone(&self) -> sockaddr_storage { *self } + } #[repr(C)] #[derive(Copy, Clone)] pub struct sockaddr_in { pub sin_len: u8, @@ -917,11 +920,14 @@ pub mod bsd44 { pub ai_next: *mut addrinfo, } #[repr(C)] - #[derive(Copy, Clone)] pub struct sockaddr_un { + #[derive(Copy)] pub struct sockaddr_un { pub sun_len: u8, pub sun_family: sa_family_t, pub sun_path: [c_char; 104] } + impl ::core::clone::Clone for sockaddr_un { + fn clone(&self) -> sockaddr_un { *self } + } #[repr(C)] #[derive(Copy, Clone)] pub struct ifaddrs { pub ifa_next: *mut ifaddrs, @@ -1125,13 +1131,16 @@ pub mod bsd44 { pub sa_data: [u8; 14], } #[repr(C)] - #[derive(Copy, Clone)] pub struct sockaddr_storage { + #[derive(Copy)] pub struct sockaddr_storage { pub ss_len: u8, pub ss_family: sa_family_t, pub __ss_pad1: [u8; 6], pub __ss_align: i64, pub __ss_pad2: [u8; 112], } + impl ::core::clone::Clone for sockaddr_storage { + fn clone(&self) -> sockaddr_storage { *self } + } #[repr(C)] #[derive(Copy, Clone)] pub struct sockaddr_in { pub sin_len: u8, @@ -1179,11 +1188,14 @@ pub mod bsd44 { pub ai_next: *mut addrinfo, } #[repr(C)] - #[derive(Copy, Clone)] pub struct sockaddr_un { + #[derive(Copy)] pub struct sockaddr_un { pub sun_len: u8, pub sun_family: sa_family_t, pub sun_path: [c_char; 104] } + impl ::core::clone::Clone for sockaddr_un { + fn clone(&self) -> sockaddr_un { *self } + } #[repr(C)] #[derive(Copy, Clone)] pub struct ifaddrs { pub ifa_next: *mut ifaddrs, @@ -1405,13 +1417,16 @@ pub mod bsd44 { pub sa_data: [u8; 14], } #[repr(C)] - #[derive(Copy, Clone)] pub struct sockaddr_storage { + #[derive(Copy)] pub struct sockaddr_storage { pub ss_len: u8, pub ss_family: sa_family_t, pub __ss_pad1: [u8; 6], pub __ss_pad2: i64, pub __ss_pad3: [u8; 240], } + impl ::core::clone::Clone for sockaddr_storage { + fn clone(&self) -> sockaddr_storage { *self } + } #[repr(C)] #[derive(Copy, Clone)] pub struct sockaddr_in { pub sin_len: u8, @@ -1459,11 +1474,14 @@ pub mod bsd44 { pub ai_next: *mut addrinfo, } #[repr(C)] - #[derive(Copy, Clone)] pub struct sockaddr_un { + #[derive(Copy)] pub struct sockaddr_un { pub sun_len: u8, pub sun_family: sa_family_t, pub sun_path: [c_char; 104] } + impl ::core::clone::Clone for sockaddr_un { + fn clone(&self) -> sockaddr_un { *self } + } #[repr(C)] #[derive(Copy, Clone)] pub struct ifaddrs { pub ifa_next: *mut ifaddrs,