From 8e34f647ee5db795e1ea46715de61cee63f4f4a7 Mon Sep 17 00:00:00 2001 From: Jakub Wieczorek Date: Mon, 9 Jun 2014 22:14:51 +0200 Subject: [PATCH] Add missing repr(C) annotations to mutex.rs --- src/librustrt/mutex.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/librustrt/mutex.rs b/src/librustrt/mutex.rs index c2bf04917d2..eec19e9d5db 100644 --- a/src/librustrt/mutex.rs +++ b/src/librustrt/mutex.rs @@ -298,10 +298,12 @@ mod imp { static _PTHREAD_MUTEX_SIG_init: libc::c_long = 0x32AAABA7; static _PTHREAD_COND_SIG_init: libc::c_long = 0x3CB0B1BB; + #[repr(C)] pub struct pthread_mutex_t { __sig: libc::c_long, __opaque: [u8, ..__PTHREAD_MUTEX_SIZE__], } + #[repr(C)] pub struct pthread_cond_t { __sig: libc::c_long, __opaque: [u8, ..__PTHREAD_COND_SIZE__], @@ -363,7 +365,9 @@ mod imp { mod os { use libc; + #[repr(C)] pub struct pthread_mutex_t { value: libc::c_int } + #[repr(C)] pub struct pthread_cond_t { value: libc::c_int } pub static PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {