summaryrefslogtreecommitdiffstats
path: root/kdecore
diff options
context:
space:
mode:
Diffstat (limited to 'kdecore')
-rw-r--r--kdecore/kpty.cpp6
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);