summaryrefslogtreecommitdiffstats
path: root/krsync
diff options
context:
space:
mode:
authorOBATA Akio <obache@wizdas.com>2020-08-28 16:08:41 +0900
committerSlávek Banko <slavek.banko@axis.cz>2021-02-03 22:42:21 +0100
commit1d9cf8e717fd74c8ba1468d2d83be1996048cfc5 (patch)
tree9af8ddb284b53e2e9dedb00ccc3dfe0964adce23 /krsync
parent35bff96a9ce2ea78beacd98dba537c1a5871dfff (diff)
downloadtdelibs-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 'krsync')
-rw-r--r--krsync/krsync.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/krsync/krsync.cpp b/krsync/krsync.cpp
index b9f6f1305..8ba1a54bc 100644
--- a/krsync/krsync.cpp
+++ b/krsync/krsync.cpp
@@ -97,6 +97,8 @@ Reference Manual for Version 2.2.x of the GNU C Library */
#ifdef HAVE_GETPT
master = getpt();
+#elif defined(HAVE_POSIX_OPENTPT)
+ master = posix_openpt(O_RDWR);
#else
master = open("/dev/ptmx", O_RDWR);
#endif