[PATCH] powerpc: Fix struct termio related ioctl macros
Tulio Magno Quites Machado Filho
tuliom at ascii.art.br
Fri May 16 06:10:28 AEST 2025
Madhavan Srinivasan <maddy at linux.ibm.com> writes:
> Since termio interface is now obsolete, include/uapi/asm/ioctls.h
> has some constant macros referring to "struct termio", this caused
> build failure at userspace.
>
> In file included from /usr/include/asm/ioctl.h:12,
> from /usr/include/asm/ioctls.h:5,
> from tst-ioctls.c:3:
> tst-ioctls.c: In function 'get_TCGETA':
> tst-ioctls.c:12:10: error: invalid application of 'sizeof' to incomplete type 'struct termio'
> 12 | return TCGETA;
> | ^~~~~~
>
> Even though termios.h provides "struct termio", trying to juggle definitions around to
> make it compile could introduce regressions. So better to open code it.
>
> Reported-by: Tulio Magno <tuliom at ascii.art.br>
> Closes: https://lore.kernel.org/linuxppc-dev/8734dji5wl.fsf@ascii.art.br/
> Suggested-by: Nicholas Piggin <npiggin at gmail.com>
> Signed-off-by: Madhavan Srinivasan <maddy at linux.ibm.com>
I've tested and confirmed this patch does fix the issue.
Tested-by: Tulio Magno Quites Machado Filho <tuliom at redhat.com>
Thank you!
--
Tulio Magno
More information about the Linuxppc-dev
mailing list