mirror of
https://github.com/rust-lang/rust
synced 2024-09-05 16:57:03 +00:00
Auto merge of #23967 - semarie:libc-clone, r=alexcrichton
affected struct: - sockaddr_storage - sockaddr_un apply the same method used for linux for: - bitrig/openbsd - freebsd - dragonfly this commit unbreak build for openbsd (and bitrig, freebsd and dragonfly too I think) r? @alexcrichton
This commit is contained in:
commit
d17d6e7f1f
|
@ -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,
|
||||
|
@ -3116,7 +3134,7 @@ pub mod posix88 {
|
|||
pub const MAP_FIXED : c_int = 0x0010;
|
||||
pub const MAP_ANON : c_int = 0x0800;
|
||||
|
||||
pub const MAP_FAILED : *mut c_void = -1 as *mut c_void;
|
||||
pub const MAP_FAILED : *mut c_void = !0 as *mut c_void;
|
||||
|
||||
pub const MCL_CURRENT : c_int = 0x0001;
|
||||
pub const MCL_FUTURE : c_int = 0x0002;
|
||||
|
@ -3852,7 +3870,7 @@ pub mod posix88 {
|
|||
pub const MAP_FIXED : c_int = 0x0010;
|
||||
pub const MAP_ANON : c_int = 0x1000;
|
||||
|
||||
pub const MAP_FAILED : *mut c_void = -1 as *mut c_void;
|
||||
pub const MAP_FAILED : *mut c_void = !0 as *mut c_void;
|
||||
|
||||
pub const MCL_CURRENT : c_int = 0x0001;
|
||||
pub const MCL_FUTURE : c_int = 0x0002;
|
||||
|
@ -4306,7 +4324,7 @@ pub mod posix88 {
|
|||
pub const MAP_FIXED : c_int = 0x0010;
|
||||
pub const MAP_ANON : c_int = 0x1000;
|
||||
|
||||
pub const MAP_FAILED : *mut c_void = -1 as *mut c_void;
|
||||
pub const MAP_FAILED : *mut c_void = !0 as *mut c_void;
|
||||
|
||||
pub const MCL_CURRENT : c_int = 0x0001;
|
||||
pub const MCL_FUTURE : c_int = 0x0002;
|
||||
|
|
Loading…
Reference in a new issue