From 135625df96733dae77544de7abb2eae71f4946fc Mon Sep 17 00:00:00 2001 From: Jakub Wieczorek Date: Sun, 8 Jun 2014 21:55:17 +0200 Subject: [PATCH] Mark relevant structs with repr(C) --- src/libgreen/context.rs | 1 + src/libnative/io/c_win32.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/libgreen/context.rs b/src/libgreen/context.rs index 5b1a4a8b80e..e377c203e30 100644 --- a/src/libgreen/context.rs +++ b/src/libgreen/context.rs @@ -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, diff --git a/src/libnative/io/c_win32.rs b/src/libnative/io/c_win32.rs index 93b3ec7ccef..a783a9b1243 100644 --- a/src/libnative/io/c_win32.rs +++ b/src/libnative/io/c_win32.rs @@ -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],