This commit is contained in:
luozijun 2017-12-06 17:29:04 +08:00
parent f688621ea6
commit 49b4213a18
2 changed files with 16 additions and 16 deletions

View File

@ -159,6 +159,22 @@ s! {
pub int_p_sign_posn: ::c_char, pub int_p_sign_posn: ::c_char,
pub int_n_sign_posn: ::c_char, pub int_n_sign_posn: ::c_char,
} }
// See /usr/include/net/if_dl.h
// sdl_data does not match if_dl.h on OS X,
// since the size of 12 is a minimum.
// Will be unsafe
// when sdl_nlen > 40.
pub struct sockaddr_dl {
pub sdl_len: ::c_uchar,
pub sdl_family: ::c_uchar,
pub sdl_index: ::c_ushort,
pub sdl_type: ::c_uchar,
pub sdl_nlen: ::c_uchar,
pub sdl_alen: ::c_uchar,
pub sdl_slen: ::c_uchar,
pub sdl_data: [::c_char; 46]
}
} }
pub const AIO_LISTIO_MAX: ::c_int = 16; pub const AIO_LISTIO_MAX: ::c_int = 16;

View File

@ -61,22 +61,6 @@ s! {
pub ifa_data: *mut ::c_void pub ifa_data: *mut ::c_void
} }
// See /usr/include/net/if_dl.h
// sdl_data does not match if_dl.h on OS X, since the size of 12 is a minimum.
// Will be unsafe
// when sdl_nlen > 40.
#[cfg(any(target_os = "freebsd", target_os = "macos"))]
pub struct sockaddr_dl {
pub sdl_len: ::c_uchar,
pub sdl_family: ::c_uchar,
pub sdl_index: ::c_ushort,
pub sdl_type: ::c_uchar,
pub sdl_nlen: ::c_uchar,
pub sdl_alen: ::c_uchar,
pub sdl_slen: ::c_uchar,
pub sdl_data: [::c_char; 46],
}
pub struct fd_set { pub struct fd_set {
#[cfg(all(target_pointer_width = "64", #[cfg(all(target_pointer_width = "64",
any(target_os = "freebsd", target_os = "dragonfly")))] any(target_os = "freebsd", target_os = "dragonfly")))]