diff options
author | OBATA Akio <obache@wizdas.com> | 2020-08-28 16:08:41 +0900 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2020-08-31 11:52:50 +0200 |
commit | bde317d2cd53eac0e4274257f4e5e8f718e32fd6 (patch) | |
tree | f3fa4b53add50109e21170a50ead8eb53c69cef2 /tdecore | |
parent | f17a911197bdfc46089418ddae00f35ada87b314 (diff) | |
download | tdelibs-bde317d2cd53eac0e4274257f4e5e8f718e32fd6.tar.gz tdelibs-bde317d2cd53eac0e4274257f4e5e8f718e32fd6.zip |
Add support of posix_openpt(2) to open master pseudo terminal device
Signed-off-by: OBATA Akio <obache@wizdas.com>
(cherry picked from commit 8e542575e044baf23ae636d32f1c6d4e3b8dea18)
Diffstat (limited to 'tdecore')
-rw-r--r-- | tdecore/kpty.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tdecore/kpty.cpp b/tdecore/kpty.cpp index 6e279748b..f832cd97e 100644 --- a/tdecore/kpty.cpp +++ b/tdecore/kpty.cpp @@ -329,7 +329,11 @@ bool KPty::open() // We try, as we know them, one by one. #if defined(HAVE_PTSNAME) && defined(HAVE_GRANTPT) -#ifdef _AIX +#if defined(HAVE_GETPT) + d->masterFd = ::getpt(); +#elif defined(HAVE_POSIX_OPENPT) + d->masterFd = ::posix_openpt(O_RDWR); +#elif defined(_AIX) d->masterFd = ::open("/dev/ptc",O_RDWR); #else d->masterFd = ::open("/dev/ptmx",O_RDWR); |