Skip to content

Commit ab10727

Browse files
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 <[email protected]> Suggested-by: Nicholas Piggin <[email protected]> Tested-by: Justin M. Forbes <[email protected]> Reviewed-by: Michael Ellerman <[email protected]> Closes: https://lore.kernel.org/linuxppc-dev/[email protected]/ Signed-off-by: Madhavan Srinivasan <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent e75cb60 commit ab10727

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

arch/powerpc/include/uapi/asm/ioctls.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
#define TCSETSW _IOW('t', 21, struct termios)
2424
#define TCSETSF _IOW('t', 22, struct termios)
2525

26-
#define TCGETA _IOR('t', 23, struct termio)
27-
#define TCSETA _IOW('t', 24, struct termio)
28-
#define TCSETAW _IOW('t', 25, struct termio)
29-
#define TCSETAF _IOW('t', 28, struct termio)
26+
#define TCGETA 0x40147417 /* _IOR('t', 23, struct termio) */
27+
#define TCSETA 0x80147418 /* _IOW('t', 24, struct termio) */
28+
#define TCSETAW 0x80147419 /* _IOW('t', 25, struct termio) */
29+
#define TCSETAF 0x8014741c /* _IOW('t', 28, struct termio) */
3030

3131
#define TCSBRK _IO('t', 29)
3232
#define TCXONC _IO('t', 30)

0 commit comments

Comments
 (0)