mirror of
https://github.com/UzixLS/picocom.git
synced 2025-07-19 07:21:18 +03:00
Work around GLIBC issue for powerpc. Only for USE_CUSTOM_BAUD.
For powerpc the termios ioctl numbers are defined with reference to the argument-structure size. This structure must be the one expected by the kernel (kernel termios) not the one defined by GLIBC (in termios.h). Work around this by defining ioctl numbers with reference to the privately defined termios2 structure. Applies only to Linux/PowePC, and only if USE_CUSTOM_BAUD is enabled.
This commit is contained in:
12
termbits2.h
12
termbits2.h
@ -94,11 +94,13 @@ struct termios2 {
|
||||
#define BOTHER 00037
|
||||
#define IBSHIFT 16
|
||||
|
||||
/* Use "old" ioctls for powerpc's as there are no TC*2 ones */
|
||||
#define IOCTL_SETS TCSETS
|
||||
#define IOCTL_SETSW TCSETSW
|
||||
#define IOCTL_SETSF TCSETSF
|
||||
#define IOCTL_GETS TCGETS
|
||||
/* powerpc ioctl numbers have the argument-size encoded. Make sure we
|
||||
use the correct structure (i.e. kernel termios, not LIBC termios)
|
||||
when calculating them. */
|
||||
#define IOCTL_SETS _IOW('t', 20, struct termios2)
|
||||
#define IOCTL_SETSW _IOW('t', 21, struct termios2)
|
||||
#define IOCTL_SETSF _IOW('t', 22, struct termios2)
|
||||
#define IOCTL_GETS _IOR('t', 19, struct termios2)
|
||||
|
||||
|
||||
#elif defined (__mips__)
|
||||
|
Reference in New Issue
Block a user