linux-user: Implement ioctl cmd TIOCGPTPEER

With glibc 2.27 the openpty function prefers the TIOCGPTPEER ioctl.

Signed-off-by: Andreas Schwab <schwab@suse.de>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <mvmbmhdosb9.fsf_-_@suse.de>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
Andreas Schwab 2018-01-29 11:47:06 +01:00 committed by Laurent Vivier
parent f0fa817675
commit 2b74f621f1
20 changed files with 34 additions and 0 deletions

View file

@ -187,6 +187,8 @@ struct target_termios {
/* Get Pty Number (of pty-mux device) */
#define TARGET_TIOCSPTLCK TARGET_IOW('T', 0x31, int)
/* Lock/unlock Pty */
#define TARGET_TIOCGPTPEER TARGET_IO('T', 0x41)
/* Safely open the slave */
#define TARGET_FIONCLEX 0x5450 /* these numbers need to be adjusted. */
#define TARGET_FIOCLEX 0x5451