From 333858b77c2b4f7636257808a77822c58bdd80fe Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Tue, 21 Aug 2012 02:13:12 +0400 Subject: linux-user: fix emulation of getdents In case when TARGET_ABI_BITS == 32 && HOST_LONG_BITS == 64, the last byte of the target dirent structure (aka d_type byte) was never copied from the host dirent structure, thus breaking everything that relies on valid d_type value, e.g. glob(3). Reviewed-by: Peter Maydell Signed-off-by: Dmitry V. Levin Signed-off-by: Riku Voipio --- linux-user/syscall_defs.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'linux-user/syscall_defs.h') diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 2cfda5afd5..a98cbf7b80 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -255,10 +255,10 @@ struct kernel_statfs { }; struct target_dirent { - abi_long d_ino; - abi_long d_off; - unsigned short d_reclen; - char d_name[256]; /* We must not include limits.h! */ + abi_long d_ino; + abi_long d_off; + unsigned short d_reclen; + char d_name[]; }; struct target_dirent64 { -- cgit v1.2.1