Skip to content

Commit fca8833

Browse files
committed
Modules/termios.c: stop using TC operations that need termio.h
Modules/termios.c makes use of TCGETA, TCSETA, TCSETAF and TCSETAW if they are defined. They are defined by kernel headers on a limited set of CPU architectures, but require the "struct termio" definition to exist, and this structure definition has been removed from glibc as of version 2.42. Since these are seldomly used, we take the approach of just dropping support for those, in order to fix the following build issue: ./Modules/termios.c:1119:16: error: invalid application of 'sizeof' to incomplete type 'struct termio' 1119 | {"TCGETA", TCGETA}, | ^~~~~~ ./Modules/termios.c:1131:16: error: invalid application of 'sizeof' to incomplete type 'struct termio' 1131 | {"TCSETA", TCSETA}, | ^~~~~~ ./Modules/termios.c:1134:17: error: invalid application of 'sizeof' to incomplete type 'struct termio' 1134 | {"TCSETAF", TCSETAF}, | ^~~~~~~ ./Modules/termios.c:1137:17: error: invalid application of 'sizeof' to incomplete type 'struct termio' 1137 | {"TCSETAW", TCSETAW}, | ^~~~~~~ make[1]: *** [Makefile:3403: Modules/termios.o] Error 1 This issue is observed at least on sparc64, but not on more "mainstream" CPU architectures, as they do not define TCGETA/TCSETA/TCSETAF/TCSETAW. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
1 parent 58e1c7a commit fca8833

1 file changed

Lines changed: 0 additions & 12 deletions

File tree

Modules/termios.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,9 +1116,6 @@ static struct constant {
11161116
#ifdef TCFLSH
11171117
{"TCFLSH", TCFLSH},
11181118
#endif
1119-
#ifdef TCGETA
1120-
{"TCGETA", TCGETA},
1121-
#endif
11221119
#ifdef TCGETS
11231120
{"TCGETS", TCGETS},
11241121
#endif
@@ -1128,15 +1125,6 @@ static struct constant {
11281125
#ifdef TCSBRKP
11291126
{"TCSBRKP", TCSBRKP},
11301127
#endif
1131-
#ifdef TCSETA
1132-
{"TCSETA", TCSETA},
1133-
#endif
1134-
#ifdef TCSETAF
1135-
{"TCSETAF", TCSETAF},
1136-
#endif
1137-
#ifdef TCSETAW
1138-
{"TCSETAW", TCSETAW},
1139-
#endif
11401128
#ifdef TCSETS
11411129
{"TCSETS", TCSETS},
11421130
#endif

0 commit comments

Comments
 (0)