Skip to content

This fixes the OpenBSD and Bitrig builds. #23988

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions src/liblibc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1299,7 +1299,7 @@ pub mod types {
pub mod posix01 {
use types::common::c95::{c_void};
use types::os::arch::c95::{c_char, c_int, size_t,
time_t, suseconds_t, c_long};
time_t, suseconds_t, c_long};
use types::os::arch::c99::{uintptr_t};

pub type pthread_t = uintptr_t;
Expand Down Expand Up @@ -1405,13 +1405,16 @@ pub mod types {
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,
Expand Down Expand Up @@ -1459,11 +1462,14 @@ pub mod types {
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,
Expand Down Expand Up @@ -4306,7 +4312,7 @@ pub mod consts {
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 = -(1 as c_int) as *mut c_void;

pub const MCL_CURRENT : c_int = 0x0001;
pub const MCL_FUTURE : c_int = 0x0002;
Expand Down