summaryrefslogtreecommitdiffstats
path: root/linux-user
diff options
context:
space:
mode:
authorAlexander Graf2013-07-06 14:17:53 +0200
committerRiku Voipio2013-07-23 16:28:28 +0200
commitddaa7e5a2ad0ef20fd3d1cc44a9ade75e5eabcfc (patch)
treec68ccb045db8e8bbb73088d79022e5c2bd7de01a /linux-user
parentlinux-user: fix segmentation fault passing with h2g(x) != x (diff)
downloadqemu-ddaa7e5a2ad0ef20fd3d1cc44a9ade75e5eabcfc.tar.gz
qemu-ddaa7e5a2ad0ef20fd3d1cc44a9ade75e5eabcfc.tar.xz
qemu-ddaa7e5a2ad0ef20fd3d1cc44a9ade75e5eabcfc.zip
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 <agraf@suse.de> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/syscall_defs.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index cb6341fff1..086fbfffe7 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;