mirror of
https://github.com/rust-lang/rust
synced 2024-11-02 13:50:48 +00:00
don't derive Clone, but impl it
affected struct: - sockaddr_storage - sockaddr_un apply the same method used for linux for: - bitrig/openbsd - freebsd - dragonfly
This commit is contained in:
parent
cf00fc4da9
commit
48b3def76c
1 changed files with 24 additions and 6 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue