linux-user: Fix definition of target_sigevent for 32-bit guests
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 2 Sep 2016 17:40:01 +0000 (18:40 +0100)
committerRiku Voipio <riku.voipio@linaro.org>
Fri, 21 Oct 2016 12:19:41 +0000 (15:19 +0300)
commit17351c3f11e52101e1498ba03eec06fa5e4e713a
treedc36c8d583bf12bf0888f8f229250db5fbaf89fc
parent52956a9b46e2a0894bc2de039e3704a4e23e6907
linux-user: Fix definition of target_sigevent for 32-bit guests

The sigevent structure includes a union with some fields which
are pointers. For the QEMU target_sigevent structure we must
represent these as abi_ulongs, not host function pointers.

This error was causing the compiler to believe it should 8-align
the _sigev_un union on a 64-bit host, which meant that the
code in target_to_host_sigevent() was looking at the wrong
offset to find the _tid field, and timer_create() would
spuriously fail with EINVAL.

This fixes the final loose end noted in LP:1042388.

While we're editing the structure, switch the 'int32_t' fields
to 'abi_int'; this will only matter for guests with non-standard
integer alignment like m68k.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
linux-user/syscall_defs.h