Re: [PATCH] selftests/liveupdate: include <termios.h> for TCGETS

From: Pratyush Yadav

Date: Fri Dec 04 2026 - 10:10:51 EST


On Fri, Dec 04 2026, Sasha Levin wrote:

> The unknown_ioctl_number test passes TCGETS to a session fd. On powerpc
> TCGETS is _IOR('t', 19, struct termios), and nothing that liveupdate.c
> includes declares struct termios, so the test does not build there:
>
> liveupdate.c:560:37: error: invalid application of 'sizeof' to
> incomplete type 'struct termios'
>
> Include <termios.h>. The test only needs a command that is not a
> liveupdate ioctl, so it does not matter that glibc's struct termios is
> larger than the kernel's on powerpc.
>
> Fixes: 6f8be8fa8e6f ("selftests/liveupdate: Test ENOTTY for unknown ioctl numbers")
> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

Reviewed-by: Pratyush Yadav <pratyush@xxxxxxxxxx>

[...]

--
Regards,
Pratyush Yadav