import socklen_t from sys_socket instead of bits
This commit is contained in:
@@ -6,7 +6,7 @@ use core::{mem, ptr};
|
||||
|
||||
use crate::{
|
||||
error::ResultExt,
|
||||
header::{bits_iovec::iovec, bits_safamily_t::sa_family_t, bits_socklen_t::socklen_t},
|
||||
header::{bits_iovec::iovec, bits_safamily_t::sa_family_t},
|
||||
platform::{
|
||||
PalSocket, Sys,
|
||||
types::{
|
||||
@@ -15,6 +15,8 @@ use crate::{
|
||||
},
|
||||
};
|
||||
|
||||
pub use crate::header::bits_socklen_t::socklen_t;
|
||||
|
||||
pub mod constants;
|
||||
|
||||
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_socket.h.html>.
|
||||
@@ -89,9 +91,10 @@ const _SS_PADDING: usize = _SS_MAXSIZE - mem::size_of::<sa_family_t>() - mem::si
|
||||
/// * [`usize`] is used because it's the width of a pointer for a given platform
|
||||
/// * The order of the fields is important because the bytes in the padding will be cast to and
|
||||
/// from protocol structs in C
|
||||
///
|
||||
/// cbindgen:ignore
|
||||
#[repr(C)]
|
||||
//#[derive(CheckVsLibcCrate)] FIXME: can't ignore private fields yet
|
||||
/// cbindgen:ignore
|
||||
pub struct sockaddr_storage {
|
||||
pub ss_family: sa_family_t,
|
||||
__ss_pad2: [u8; _SS_PADDING],
|
||||
|
||||
Reference in New Issue
Block a user