From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57615) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1eqC-0005Ob-Vi for qemu-devel@nongnu.org; Tue, 23 Jul 2013 11:49:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V1epz-0001aa-7f for qemu-devel@nongnu.org; Tue, 23 Jul 2013 11:49:32 -0400 Received: from afflict.kos.to ([92.243.29.197]:45191) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1epz-0001aL-2J for qemu-devel@nongnu.org; Tue, 23 Jul 2013 11:49:19 -0400 Received: from kos.to (a91-156-63-85.elisa-laajakaista.fi [91.156.63.85]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by afflict.kos.to (Postfix) with ESMTPSA id A3D7526553 for ; Tue, 23 Jul 2013 17:49:17 +0200 (CEST) From: riku.voipio@linaro.org Date: Tue, 23 Jul 2013 18:49:08 +0300 Message-Id: In-Reply-To: References: Subject: [Qemu-devel] [PULL 18/21] linux-user: Fix epoll on ARM hosts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alexander Graf From: Alexander Graf The epoll emulation uses data structures without packing them, so the compiler might choose to add padding inside. This patch makes the most offending one (target_epoll_event) a packed structure to make sure we don't pad it by accident. ARM would pad it, so declare the padding mandatory for ARM targets. This fixes i386-on-ARM epoll emulation for me. Signed-off-by: Alexander Graf Signed-off-by: Riku Voipio --- linux-user/syscall_defs.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index cb6341f..086fbff 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -2459,8 +2459,11 @@ typedef union target_epoll_data { struct target_epoll_event { uint32_t events; +#ifdef TARGET_ARM + uint32_t __pad; +#endif target_epoll_data_t data; -}; +} QEMU_PACKED; #endif struct target_rlimit64 { uint64_t rlim_cur; -- 1.8.1.2