diff options
author | OBATA Akio <obache@wizdas.com> | 2020-08-28 16:08:41 +0900 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2021-02-03 22:42:21 +0100 |
commit | 1d9cf8e717fd74c8ba1468d2d83be1996048cfc5 (patch) | |
tree | 9af8ddb284b53e2e9dedb00ccc3dfe0964adce23 /kdecore | |
parent | 35bff96a9ce2ea78beacd98dba537c1a5871dfff (diff) | |
download | tdelibs-1d9cf8e717fd74c8ba1468d2d83be1996048cfc5.tar.gz tdelibs-1d9cf8e717fd74c8ba1468d2d83be1996048cfc5.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 'kdecore')
-rw-r--r-- | kdecore/kpty.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kdecore/kpty.cpp b/kdecore/kpty.cpp index 45e9c6ffd..7c58f74a9 100644 --- a/kdecore/kpty.cpp +++ b/kdecore/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); |