Mark relevant structs with repr(C)

This commit is contained in:
Jakub Wieczorek 2014-06-08 21:55:17 +02:00
parent f7d86b2f4a
commit 135625df96
2 changed files with 3 additions and 0 deletions

View file

@ -143,6 +143,7 @@ extern {
// stacks are disabled.
#[cfg(target_arch = "x86")]
#[repr(C)]
struct Registers {
eax: u32, ebx: u32, ecx: u32, edx: u32,
ebp: u32, esi: u32, edi: u32, esp: u32,

View file

@ -20,6 +20,7 @@ pub static FIONBIO: libc::c_long = 0x8004667e;
static FD_SETSIZE: uint = 64;
pub static MSG_DONTWAIT: libc::c_int = 0;
#[repr(C)]
pub struct WSADATA {
pub wVersion: libc::WORD,
pub wHighVersion: libc::WORD,
@ -32,6 +33,7 @@ pub struct WSADATA {
pub type LPWSADATA = *mut WSADATA;
#[repr(C)]
pub struct fd_set {
fd_count: libc::c_uint,
fd_array: [libc::SOCKET, ..FD_SETSIZE],