linux-user: Always use flexible arrays for dirent d_name
commit540a736f54a5dffb0851f2adf455f50869b409a1
authorRichard Henderson <richard.henderson@linaro.org>
Sun, 14 Nov 2021 10:35:37 +0000 (14 11:35 +0100)
committerLaurent Vivier <laurent@vivier.eu>
Sun, 21 Nov 2021 15:19:17 +0000 (21 16:19 +0100)
treee26fda50b6159659dd69e78b59473c91a19cddcd
parentfd08ddb9cb050182c0f7c9d74b11038e9c479f4f
linux-user: Always use flexible arrays for dirent d_name

We currently use a flexible array member for target_dirent,
but use incorrectly fixed length arrays for target_dirent64,
linux_dirent and linux_dirent64.

This requires that we adjust the definition of the VFAT READDIR
ioctls which hard-code the 256 namelen size into the ioctl constant.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20211114103539.298686-3-richard.henderson@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
linux-user/syscall.c
linux-user/syscall_defs.h