From: Alexander Graf Date: Sat, 6 Jul 2013 12:17:53 +0000 (+0200) Subject: linux-user: Fix epoll on ARM hosts X-Git-Tag: qemu-xen-4.4.0-rc1~6^2~139^2~3 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=ddaa7e5a2ad0ef20fd3d1cc44a9ade75e5eabcfc;p=qemu-upstream-4.4-testing.git linux-user: Fix epoll on ARM hosts 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 --- diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index cb6341fff..086fbfffe 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;