]> www.infradead.org Git - users/hch/misc.git/commit
powerpc: Fix struct termio related ioctl macros
authorMadhavan Srinivasan <maddy@linux.ibm.com>
Sat, 17 May 2025 14:22:37 +0000 (19:52 +0530)
committerMadhavan Srinivasan <maddy@linux.ibm.com>
Fri, 13 Jun 2025 16:48:50 +0000 (22:18 +0530)
commitab107276607af90b13a5994997e19b7b9731e251
treefb1f40f0d8c4050a77981c2a7c66370388b2e25f
parente75cb6010838f61b9d63e921d1763a8ab177e38e
powerpc: Fix struct termio related ioctl macros

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@ascii.art.br>
Suggested-by: Nicholas Piggin <npiggin@gmail.com>
Tested-by: Justin M. Forbes <jforbes@fedoraproject.org>
Reviewed-by: Michael Ellerman <mpe@ellerman.id.au>
Closes: https://lore.kernel.org/linuxppc-dev/8734dji5wl.fsf@ascii.art.br/
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20250517142237.156665-1-maddy@linux.ibm.com
arch/powerpc/include/uapi/asm/ioctls.h