Mark relevant structs with repr(C)
This commit is contained in:
parent
f7d86b2f4a
commit
135625df96
2 changed files with 3 additions and 0 deletions
|
@ -143,6 +143,7 @@ extern {
|
||||||
// stacks are disabled.
|
// stacks are disabled.
|
||||||
|
|
||||||
#[cfg(target_arch = "x86")]
|
#[cfg(target_arch = "x86")]
|
||||||
|
#[repr(C)]
|
||||||
struct Registers {
|
struct Registers {
|
||||||
eax: u32, ebx: u32, ecx: u32, edx: u32,
|
eax: u32, ebx: u32, ecx: u32, edx: u32,
|
||||||
ebp: u32, esi: u32, edi: u32, esp: u32,
|
ebp: u32, esi: u32, edi: u32, esp: u32,
|
||||||
|
|
|
@ -20,6 +20,7 @@ pub static FIONBIO: libc::c_long = 0x8004667e;
|
||||||
static FD_SETSIZE: uint = 64;
|
static FD_SETSIZE: uint = 64;
|
||||||
pub static MSG_DONTWAIT: libc::c_int = 0;
|
pub static MSG_DONTWAIT: libc::c_int = 0;
|
||||||
|
|
||||||
|
#[repr(C)]
|
||||||
pub struct WSADATA {
|
pub struct WSADATA {
|
||||||
pub wVersion: libc::WORD,
|
pub wVersion: libc::WORD,
|
||||||
pub wHighVersion: libc::WORD,
|
pub wHighVersion: libc::WORD,
|
||||||
|
@ -32,6 +33,7 @@ pub struct WSADATA {
|
||||||
|
|
||||||
pub type LPWSADATA = *mut WSADATA;
|
pub type LPWSADATA = *mut WSADATA;
|
||||||
|
|
||||||
|
#[repr(C)]
|
||||||
pub struct fd_set {
|
pub struct fd_set {
|
||||||
fd_count: libc::c_uint,
|
fd_count: libc::c_uint,
|
||||||
fd_array: [libc::SOCKET, ..FD_SETSIZE],
|
fd_array: [libc::SOCKET, ..FD_SETSIZE],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue